helios-ag / FMElfinderBundle

:file_folder: ElFinderBundle provides ElFinder integration with TinyMCE, CKEditor, Summernote editors
MIT License
274 stars 127 forks source link

S3 Thumbnail issue #369

Closed nitrique closed 4 years ago

nitrique commented 5 years ago

Hey guys,

Issue Type:
Bundle Version:

9.3.1

Summary:

Cannot use thumbnail on S3

Steps To Reproduce:

Use Minio as S3 server

Set fm_elfinder.yaml to following :

fm_elfinder:
    instances:
        default:
            locale: "fr" # defaults to current request locale
            editor: ckeditor # other options are tinymce, tinymce4, fm_tinymce, form, simple, custom
            path_prefix: ''
            include_assets: true # disable if you want to manage loading of javascript and css assets manually
            connector:
                debug: true # defaults to false
                roots: # at least one root must be defined, defines root filemanager directories
                    uploads:
                        driver: Flysystem
                        url: '%env(S3_ENDPOINT)%ckeditor/'
                        path: '/'
                        flysystem:
                            type: aws_s3_v3
                            options:
                                aws_s3_v3:
                                    version: '%env(S3_VERSION)%'
                                    use_path_style_endpoint: true
                                    endpoint: '%env(S3_ENDPOINT)%'
                                    region: '%env(S3_REGION)%'
                                    key: '%env(S3_KEY)%'
                                    secret: '%env(S3_SECRET)%'
                                    bucket_name: 'ckeditor'
                        upload_allow:
                            [
                                "image/png",
                                "image/jpg",
                                "image/jpeg",
                                "application/mp4",
                                "video/mp4",
                                "application/pdf",
                                "application/x-pdf",
                            ]
                        upload_deny: ["all"]
                        upload_max_size: 20M
Expected Results:

See thumbnail in elfinder

Actual Results:

No thumbnail is generated, but in symfony's public dir a .tmb is created on first run, so it don't take care of file system driver used, I guess.

Thanks for help, Regards. Nicolas

helios-ag commented 4 years ago

I don't know is it actual or not, but probably if someone will look for a solution (i didn't used S3 for while with bundle), answer with example config is here: https://github.com/helios-ag/FMElfinderBundle/issues/388#issuecomment-578380700

Key option for thumbnail is tmb_url: 'self'