dustin10 / VichUploaderBundle

A simple Symfony bundle to ease file uploads with ORM entities and ODM documents.
MIT License
1.85k stars 519 forks source link

form field is broken when using flysytem and liip_imagine #743

Open bruno-ds opened 7 years ago

bruno-ds commented 7 years ago

hello, using vich_uploader in conjunction with liip_imagine and flysystem (s3), I'm having trouble to use uri_prefix :

so basically, we can have either the form field working or liip_magine, not both.

Koc commented 7 years ago

@bruno-ds have you idea how it could be solved? Maybe open PR. Interesting issue, I think that many people can got it.

bruno-ds commented 7 years ago

I propose this kind of change :

Going this way is not the smartest, but I think that it's the laziest since it creates the less risk.

Alternative implementation would need also two parameter but instead of swapping, it would concatenate them accordingly to new parameters.

Koc commented 7 years ago

Does your liipimagine data loaders configuration are in sync with vichuploader storage configuration? Have you tryed http://symfony.com/doc/master/bundles/LiipImagineBundle/data-loader/flysystem.html or http://symfony.com/doc/master/bundles/LiipImagineBundle/data-loader/stream.html ? Or https://symfony.com/doc/current/bundles/LiipImagineBundle/cache-resolver/aws_s3.html

bruno-ds commented 7 years ago

Hello, I use the first one : http://symfony.com/doc/master/bundles/LiipImagineBundle/data-loader/flysystem.html but unless it still have to be given the path to the file, in order to work, unless I misunderstood something (it is strongly possible ^^), this path must be "absolute", without the protocol and the host.