Hi @AyodejiO ,
No, it doesn't natively support FTP, Dropbox or S3 API。 (but you can set your dropbox daemon to manage the filemanager upload folder or use s3sync to sync files with AWS s3, or serve the upload folder with a FTP server)
We may consider using Laravel Filesystem API to store files for better AWS s3 (and other storage driver) support. https://laravel.com/docs/5.2/filesystem
PR is welcome!
God bless you @youchenlee.
Hi @g0110280
Is this still on the roadmap? :)
@pepijnolivier yes! It is under active development.
yes! It is under active development.
@g0110280 cool news,
do you have release date for this issue?
@www666 Related to #471. Still need a lot of work. But we might release an alpha version in two weeks.
@g0110280 Still need a lot of work. But we might release an alpha version in two weeks.
Thx, look forward to ;-)
Done in v2.0.0-alpha.
I have this problem when using "dev-master or v2.0.0-alpha" versions either from new project or from already exists project (Laravel 5.5.*):
Class 'Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider' not found
Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1
All I want is a tool to upload files to AWS S3 and selecting from corresponding folder without any other functionality like Cropping, rename, delete, ... is it stable ??
v2.0.0-alpha is not stable, since we are still testing with cloud storage and development on Windows. We will keep releasing more alpha versions it we gain any progress.
Has support for s3 already exited the alpha?
@craines yes. But documents are not complete yet. You should setup s3 disk in config/filesystem.php, and set driver to s3 in config/lfm.php.
For some reason it is not saving and syncing with s3.
Below is my settings
config/filesystems.php
` return [
/*
|--------------------------------------------------------------------------
| Default Filesystem Disk
|--------------------------------------------------------------------------
|
| Here you may specify the default filesystem disk that should be used
| by the framework. The "local" disk, as well as a variety of cloud
| based disks are available to your application. Just store away!
|
*/
'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
| Default Cloud Filesystem Disk
|--------------------------------------------------------------------------
|
| Many applications store files both locally and in the cloud. For this
| reason, you may specify a default "cloud" driver here. This driver
| will be bound as the Cloud disk implementation in the container.
|
*/
'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
| Filesystem Disks
|--------------------------------------------------------------------------
|
| Here you may configure as many filesystem "disks" as you wish, and you
| may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options.
|
| Supported Drivers: "local", "ftp", "s3", "rackspace"
|
*/
'disks' => [
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID', 'xxxxxxxxxxxxxxx'),
'secret' => env('AWS_SECRET_ACCESS_KEY', 'xxxxxxxxxxxx'),
'region' => env('AWS_DEFAULT_REGION', 'xxxxx'),
'bucket' => env('AWS_BUCKET', 'xxxxx'),
],
],
];`
config/lfm.php
`
/*
|--------------------------------------------------------------------------
| Documentation for this config :
|--------------------------------------------------------------------------
| online => http://unisharp.github.io/laravel-filemanager/config
| offline => vendor/unisharp/laravel-filemanager/docs/config.md
*/
return [
/*
|--------------------------------------------------------------------------
| Routing
|--------------------------------------------------------------------------
*/
'use_package_routes' => true,
'middlewares' => ['web'],
// The url to this package. Change it if necessary.
'url_prefix' => 'filemanager',
// Use relative paths (without domain)
'relative_paths' => false,
/*
|--------------------------------------------------------------------------
| Multi-User Mode
|--------------------------------------------------------------------------
*/
'allow_multi_user' => false,
'allow_share_folder' => true,
/*
|--------------------------------------------------------------------------
| Folder Names
|--------------------------------------------------------------------------
*/
// Flexible way to customize client folders accessibility
// If you want to customize client folders, publish tag="lfm_handler"
// Then you can rewrite userField function in App\Handler\ConfigHander class
// And set 'user_field' to App\Handler\ConfigHander::class
// Ex: The private folder of user will be named as the user id.
'user_folder_name' => UniSharp\LaravelFilemanager\Handlers\ConfigHandler::class,
'shared_folder_name' => 'shares',
'thumb_folder_name' => 'thumbs',
'folder_categories' => [
'file' => [
'folder_name' => 'files',
'startup_view' => 'grid',
'max_size' => 50000,
'valid_mime' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif',
'image/svg+xml',
],
],
'image' => [
'folder_name' => 'photos',
'startup_view' => 'list',
'max_size' => 50000,
'valid_mime' => [
'image/jpeg',
'image/pjpeg',
'image/png',
'image/gif',
'image/svg+xml',
'application/pdf',
'text/plain',
],
],
],
/*
|--------------------------------------------------------------------------
| Upload / Validation
|--------------------------------------------------------------------------
*/
'driver' => 's3',
'disk' => 's3',
'rename_file' => false,
'alphanumeric_filename' => false,
'alphanumeric_directory' => false,
'should_validate_size' => false,
'should_validate_mime' => false,
// permissions to be set when create a new folder or when it creates automatically with thumbnails
'create_folder_mode' => 0755,
// permissions to be set on file upload.
'create_file_mode' => 0644,
// If true, it will attempt to chmod the file after upload
'should_change_file_mode' => true,
/*
|--------------------------------------------------------------------------
| Thumbnail
|--------------------------------------------------------------------------
*/
// If true, image thumbnails would be created during upload
'should_create_thumbnails' => true,
// Create thumbnails automatically only for listed types.
'raster_mimetypes' => [
'image/jpeg',
'image/pjpeg',
'image/png',
],
'thumb_img_width' => 200,
'thumb_img_height' => 200,
/*
|--------------------------------------------------------------------------
| File Extension Information
|--------------------------------------------------------------------------
*/
'file_type_array' => [
'pdf' => 'Adobe Acrobat',
'doc' => 'Microsoft Word',
'docx' => 'Microsoft Word',
'xls' => 'Microsoft Excel',
'xlsx' => 'Microsoft Excel',
'zip' => 'Archive',
'gif' => 'GIF Image',
'jpg' => 'JPEG Image',
'jpeg' => 'JPEG Image',
'png' => 'PNG Image',
'ppt' => 'Microsoft PowerPoint',
'pptx' => 'Microsoft PowerPoint',
],
'file_icon_array' => [
'pdf' => 'fa-file-pdf-o',
'doc' => 'fa-file-word-o',
'docx' => 'fa-file-word-o',
'xls' => 'fa-file-excel-o',
'xlsx' => 'fa-file-excel-o',
'zip' => 'fa-file-archive-o',
'gif' => 'fa-file-image-o',
'jpg' => 'fa-file-image-o',
'jpeg' => 'fa-file-image-o',
'png' => 'fa-file-image-o',
'ppt' => 'fa-file-powerpoint-o',
'pptx' => 'fa-file-powerpoint-o',
],
/*
|--------------------------------------------------------------------------
| php.ini override
|--------------------------------------------------------------------------
|
| These values override your php.ini settings before uploading files
| Set these to false to ingnore and apply your php.ini settings
|
| Please note that the 'upload_max_filesize' & 'post_max_size'
| directives are not supported.
*/
'php_ini_overrides' => [
'memory_limit' => '256M',
],
];
`
Any update on this? I was considering using this with an S3 bucket..thanks!
@gregorise you can install v2.0.0-alpha4, and in config/lfm.php you should set disk to s3. S3 bucket credentials should be set in config/filesystems.php.
Hi guys, I implemented s3 disk configuration on v2.0.0-alpha5 and have 2 differents issues:
1- I can't create folders, when i try it, a modal show me "Folder name cannot be empty!"
2- I can't delete any file, and the problem is at Class "DeleteController" - "getDelete()", because "$item_names = request('items');" is returning null everytime.
I have tried to see, what is returning on the request() with "dd(request->all());" and this is the result:
array:1 [â–¼
"working_dir" => "\1"
]
any suggest ?
Hi @Dhavanor , I copied your comment and create a new issue #721. We will check this bug soon.
Most helpful comment
@gregorise you can install
v2.0.0-alpha4, and inconfig/lfm.phpyou should setdisktos3. S3 bucket credentials should be set inconfig/filesystems.php.