oneduo / nova-file-manager Goto Github PK
View Code? Open in Web Editor NEWThe most advanced File Manager for Laravel Nova, feature rich and robust build.
Home Page: https://oneduo.github.io/nova-file-manager/
License: MIT License
The most advanced File Manager for Laravel Nova, feature rich and robust build.
Home Page: https://oneduo.github.io/nova-file-manager/
License: MIT License
The S3 filesystem I'm working with handles assets that should be publicly accessible and then files that should be kept private.
Being able to set file visibility when uploading and then determine whether the url should be signed based off of that would avoid the needless activity of signing public assets.
Another potential way of avoiding this could be to define in the config which disks should have signed urls, allowing the splitting of public and private assets onto separate disks.
Hello, I am getting this error.
"Object of class BBSLab\NovaFileManager\Support\Asset could not be converted to string"
Hi currently it's impossible to use private cloud disks.. for instance, this is how it is used with default nova image/file fields:
Image::make('Image', 'image->file')
->storeOriginalName('image->filename')
->disk('s3-private')
->preview(fn (string $file, string $disk) => Storage::disk($disk)->temporaryUrl($file, now()->addMinute()))
->thumbnail(fn (string $file, string $disk) => Storage::disk($disk)->temporaryUrl($file, now()->addMinute()))
->creationRules('required')
->updateRules('nullable'),
Here is a quickly docker-compose snipped to start a "local s3" if this helps develop this feature
minio:
image: bitnami/minio:2022
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=secret-password
- MINIO_DEFAULT_BUCKETS=development-public:public,development-private:none
Hello, is there a way to change the default cropper ratio to 16:9 from square ?
Thanks in advance for your response.
Hi there.
Amazing work on the new Access controls features!
I'm wondering if there is any way to utilize the Show/Hide buttons methods right from the Menu Item call?
MenuSection::make('File Manager')->path('/nova-file-manager')
I'm using this primarily as a read-only file browser/download for one of my projects.
Thank you!
If you double-click on an image for a quick preview you cannot "quickly" select it and return back to the resource. You have to close the modal and then select the image.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A "select" action should be added to the list of actions on top, preferably as last action.
Screenshots
Posted above
Desktop (please complete the following information):
Smartphone (please complete the following information):
Not Applicable
Additional context
Not Applicable
Describe the bug
Hello, I tried to translate your package, and despite all my attempts, it was impossible to correctly call the language keys I created. I tried copying them to the lang directory, resources/lang, resources/lang/vendor/nova-file-manager, and none of those tries worked
To Reproduce
Just trying to set up a new translation
Expected behavior
How to correctly install language keys?
Desktop (please complete the following information):
Thanks for your support
I do photo editing, when I search by image name and click on it. The results show 2 photos including old and new photos like videos.
Feature Request:
Hi currently the shape of the data that is saved to the database opens up the possibility to store extra metadata alongside the file... for example currently, I have extended it to store filename and a lowres placeholder:
{
"disk": "s3-public",
"path": "0Y2UxO2j0D2Vpw1wLQdBbF3BRvyVqQtpJL0p1MCU.jpg",
"originalFilename": "example.jpg",
"placeholder": "data:image/webp;base64,UklGRn4AAABXRUJQVlA4IHIAAABQAwCdASoIAAgAAMASJZwAdoApwD8QHsAbA3/gDY2N++/2AAD+/vWZ1LKedF+CYDV45m1/sAxx2/zjQ5b3r7K2knz8wFT/4EMhP81yX/YZ1/0qb/59/MvTi7jLnmj3e4H35/5ExN34RjeDRmcJ+nAAAAA="
}
However, there are a few places where the Asset Class is hardcoded that causes issues:
Like:
and here:
it would be great if this asset class could be defined via the config similiar to how it was done with the entities
etc...
I want to integrate file manager into ckeditor 4 , do you have any suggestions?
Describe the bug
The tool window does not appear due to error 404
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Tool window should appear
PHP v8.0.8
Laravel Nova v 4.19.5
When I installed the plugin and wanted to use the FileManager field, I had missing icons and huge graphics on the popup.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Correct graphics/styling
Solution
I have already found the solution, but would be great to include this in the documentation for future users. I had to separately run the php artisan vendor:publish --provider="NovaKit\NovaPackagesTool\LaravelServiceProvider"
command to fix the issue.
I assume the expected behavior would be it auto-close itself after clicking create:
Hi guys, thanks for this package it looks super clean, however I found several issues which render it unusable atm:
1 - The file selection modal is not letting me pick more than 1 image
FileManager::make('Images', 'content->images')->mutliple(4),
2 - Having multiple FileManager on the same resource conflicts with each other, for example when selecting a cover
, somehow it also changes the Images
FileManager::make('Cover', 'content->cover'),
FileManager::make('Images', 'content->images')->mutliple(4),
3 - Although the UI is pretty nice, the backdrop-filter
used to blur the background is super heavy which makes opening the image selection picker very laggy (tried on M1 / iMac 5k Retina), would be good if there was a setting to disable it
4 - Scroll locking issue: #4
5 - When switching the display mode from grid view
to list view
clicking on any image from the list won't do anything... I was only able to select images from the grid view
6 - Impossible to make a field nullable if set any other rule to it, somehow the field always complains it is required. It works with the default nova File field
FileManager::make('glTF', 'content->gltf')->rules('nullable', 'mimes:json,gltf,glb'),
Hi,
I have just installed this package following docs. The package was installed with no errors. Registered in Nova Service Provider. Shows in the menu. But does not work, going to url http://127.0.0.1:8000/nova/nova-file-manager gives error: :-( Whoops… Nova experienced an unrecoverable error.
, or:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.github.com/repos/oneduo/nova-file-manager/releases/latest
Any idea what I did wrong?
Hi there,
Is there a way now (or is it planned to be feature of this plugin) to convert media automatically on upload to .webp / .avif, or maybe to minify images or to create conversions (small / medium thumbnails etc...)
Thanks in advance :)
On many of my projects I use a custom service which allows me to open local applications, open files in certain applications, launch a browser at a specific url, etc.
For obvious reasons, this only works on my dev.. but that's where I do 100% of my file management anyway so this is perfectly suited to be used with your package.
I'll give you an example of what I'd want to achieve. I'd like to add a custom action so that whenever you highlight a file in your nova-file-manager, there could be a custom new icon added which when clicked would trigger "Open in Finder"
This would call a server function that would receive the file information, including its path, and then that path would be forwarded to a function that would look like this:
function myCustomFileAction($file) {
(new \App\Services\OsxAppService)->openInApp('Finder', $file->path);
}
<?php
namespace App\Services;
class OsxAppService
{
public function openInApp($app, $path)
{
$command = base_path('bash/openInApp.sh') . " '{$app}' '{$path}' 2>&1";
exec($command);
}
}
#!/bin/sh
app=${1}
path=${2}
if [[ ${app} == "photoshop" ]] ; then
app="Adobe Photoshop CC 2015"
cmd="tell application \"${app}\" to open file \"${path}\""
osascript -e "${cmd}"
elif [[ ${app} == "chrome" ]] ; then
app="Google Chrome"
cmd="open -a \"${app}\" \"${path}\""
eval $cmd
elif [[ ${app} == "iterm" ]] ; then
app="iTerm"
cmd="open -a \"${app}\" \"${path}\""
eval $cmd
elif [[ ${app} == "code" ]] ; then
app="Visual Studio Code"
cmd="tell application \"${app}\" to open \"${path}\""
osascript -e "${cmd}"
elif [[ ${app} == "finder" ]] || [[ ${app} == "preview" ]]; then
app="Finder"
cmd="tell application \"${app}\" to open (\"${path}\" as POSIX file)"
osascript -e "${cmd}"
fi
cmd="tell application \"${app}\" to set frontmost to true"
osascript -e "${cmd}"
And voila.. super easy.. this works perfectly on Mac.. only on localhost but that's just what I need.
All in all I could see custom file actions being useful in many other scenarios.. but this is the first that comes to mind.
Any chance you could add support for custom file actions pretty please?
Many thanks!! Love your project!
Hi there, I would like to ask if the search functionallity is intended to work only in currently active (opened) directory? Shouldn't it work multilevel like across whole filesystem ? Because if I try to search some file which is nested two or three levels, it wont find it.
Thanks
I'm getting a 404 with an s3 disk with the path:
MenuItem::make('File Manager')->path('/nova-file-manager/feed-archive')
My workaround is:
MenuItem::link('Feed Archive', '/nova-file-manager?path=%2Ffeed-archive'),
When using Digital Ocean Spaces (which uses the S3 driver) I can upload an initial file or folder, but after that if I try to add another I get an error saying that the selected path already exists. I have triple checked and in each test the folder or file does not exist.
My Digital Ocean disk config is as below:
'digitalocean' => [
'driver' => 's3',
'key' => env('DIGITALOCEAN_SPACES_KEY'),
'secret' => env('DIGITALOCEAN_SPACES_SECRET'),
'endpoint' => env('DIGITALOCEAN_SPACES_ENDPOINT'),
'region' => env('DIGITALOCEAN_SPACES_REGION'),
'bucket' => env('DIGITALOCEAN_SPACES_BUCKET'),
'url' => env('DIGITALOCEAN_SPACES_URL'),
'visibility' => 'public',
'use_path_style_endpoint' => false,
'throw' => false,
],
Screenshots
First upload or folder creation works ok:
Screenshot of the spaces view in Digital Ocean to show only one folder present:
I'm using Laravel ~9.0, Nova ~4.0 and the file manager package version is ^0.7.3
I'm on MacOS in Google Chrome.
I apologise if this is a configuration error on my part, but I have checked things over and over. Also, because it allows an initial file upload or creation it makes me think that the configuration is probably correct.
Thanks for the fantastic work on this package. Do let me know if I can provide anymore useful info.
Chris
As seen in the video below, It's impossible to select a different asset without unselecting the previous one first
Describe the bug
It returns an error message when try to define a disk on the fly (link)[https://oneduo.github.io/nova-file-manager/access-control.html#on-demand-filesystem].
Message: nova-file-manager::validation.disk.missing
Error lauched by class vendor/oneduo/nova-file-manager/src/Rules/DiskExistsRule.php
To Reproduce
Steps to reproduce the behavior:
FileManager::make(__('Files'), 'files')->multiple()->filesystem(function (NovaRequest $request) {
return Storage::build([
'driver' => 'local',
'root' => storage_path('app/public/myfolder' ),
]);
})
Expected behavior
Not show error.
I noticed the chunks
folder inside the storage has grown in size. I realized that every single image uploaded to the system has a .part
file stored in this folder. I guess this was meant to be a temporary folder that is used to upload images and then move them to the correct folder. But instead the images stay there.
To Reproduce
storage/chunks
Expected behavior
The folder should be empty
Desktop (please complete the following information):
Hello.
The selection does not work - a check mark does not appear when clicking on the file.
laravel 9.24
nova 4.12.14
nova-file-manager 0.2.4
Browsers
firefox, chrome, opera
Hello there, is there a way to use this filemanager with nova TinyMCE ? I tried to put this inside nova-tinymce.php config file but I am getting 404 error.
'use_lfm' => true, 'lfm_url' => 'nova/nova-filemanager',
thanks in advance. :)
Hi!
With last Nova 4.19 path is not working.
FileManager::make(__('Photos'), 'photos')->path('/photos'),
Hi, version 0.5.0 introduced a change in the way it fetches the list of files on the modal window that breaks compatibility with flexible-content-fields
package.
Here on this function, it tries to find the FileManager
field by instance, but when using it inside a flexible layout it throws a 404 error that prevents the window from opening...
Hey there,
I would like to know how can I set root directory for file manager for different user roles.
For instance, we have admin and employee user role. My folder structure looks like this
public // main root
----users
-------employee
-----------bob // bob's root
-----------frank
-------admin
-----------admin1
-----------admin2
----other
......
I want for instance Bob to be able to see just his folder and everything in that folder. And Admins to see everything from main root
I tried to create on-demand filesystem like this:
But it saved media to database with "default" disk which i don't have (I am using public) and path relative to bob's root. I need every image to be saved relative to main root.
Any ideas ?
Thanks in advance.
Hi everyone!
I don't know if this is a bug or I do something wrong, but navigating through FileManager I can see in breadcrumbs only Home - as icon - and latest folder I reached. There is no way to make step back, and breadcrumbs does not give this option as well. E.g. I Have in main public folder 5 subfolders and in some of them I have sub sub folders. If I will navigate into sub sub folder, there is no button to go back to sub folder, and breadcrumbs gives the only option to go Home - public folder.
Minor issue:
Note how the disk collapses in 2 lines when expanding the search box... it's easily fixable by adding a white-space: nowrap
Describe the bug
When I use the field inside a tool (eg. Nova Settings) the modal does not show the images and I have a 404 error in the console.
To Reproduce
FileManager::make('Image', 'home_seo_image'),
Expected behavior
The modal should display the images. Instead it has a loading indicator because of failed ajax call (404)
Screenshots
The bug is demonstrated on this video:
Desktop (please complete the following information):
Additional context
Nothing
Another bug:
If you have multiple file fields and you toggle the disk selection when you hit save all fields will update the disk to the selected one..
The image not displaying on the
private
disk was tracked here: #54
2 Features here:
1 - Would be nice if we could simply drag the asset straight into the modal window without entering the upload mode
2 - Add the ability to upload multiple assets at once, currently it only allows to upload 1 by 1
Problem:
When a user clicks to select an image from a field and uploads a new image, the uploaded image does not get automatically selected and the user has to search for it and select it. On a folder containing a lot of images, the only option is to use the search toolbar since they order alphabetically.
Solution:
When a user upload a single image, the preview modal could open and the user can select it with a single click.
If the user uploads more than one image, ideally all of them should be selected and shown in a modal for confirmation (like the same modal the user sees while uploading them)
Using 0.7.0
In my config file I see that the default is to not show hidden file
'show_hidden_files' => env('NOVA_FILE_MANAGER_SHOW_HIDDEN_FILES', false),
And yet in some folders I am seeing the .DS_Store
, shouldn't this file be hidden?
Hi
I'm looking for a way to show/hide a Open File Manager button, depending on the value of one or more other fields.
Originally posted by ymauron August 9, 2022
Hi,
I really like the idea of this package. I installed it but get a 404 error when clicking on the FileManager menu. Any idea on how to debug this ?
Thanks
Hi if you are currently in a subfolder then toggle to any other disks where that same folder does not exist it throws an error.
Hey! This is Aaron from the Twitch stream yesterday. I took a look at the package and honestly it looks amazing. It seems to be really well architected and I dove into some of the classes and they look super clean. You should be proud of this! I don't use Nova on any projects, but if I do I'll absolutely reach for this, nice job! Have you submitted it to Laravel News?
When searching for a filename I get a list of found files like the following image
However when I click on an item, nothing happens 🤷♂️
If I am on a folder with only a few images (not paginated) then searching and clicking on a result would open the image modal but without a "Select Image" action!
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Ideally, I want to automatically select the image and return back to the resource but I feel it should better open the image modal with all actions (crop,delete, etc.) with a "Select Image" action.
Screenshots
Posted above
Desktop (please complete the following information):
Smartphone (please complete the following information):
Not Applicable
Additional context
Not Applicable
Describe the bug
Today I faced a weird issue where files could not be deleted/renamed/moved (everything else worked) when the folder they were placed started with a whitespace
To Reproduce
Steps to reproduce the behavior:
ExampleFolder
Expected behavior
Folder name should be trimmed when created or the filesystem should not crash if it contains it...
Hello,
I am facing a problem. When user renames a file / folder, I need all paths associated with this file / folder to get changed. Is there any hook or something that could help me resolve this?
Many thanks in advance. :)
Hi thanks for the updates, it is looking/working much better now!
I noticed another issue on the latest version, when single clicking on the image on the edit view it submits the form:
After closing the file manager window in nova resource associated, the browser's native scroll no longer works
First of all, thank you both for developing and maintaining a really great package.
I have a few feature requests around permissions;
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.