dustin10 / VichUploaderBundle

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

Define default upload destination #1454

Closed laurentmuller closed 3 months ago

laurentmuller commented 3 months ago

Feature Request

Q A
New Feature yes
RFC ?
BC Break no

Summary

This will be nice if the upload_destination parameter can be set automatically.

In examples, all configurations have the follow values uri_prefix and upload_destination:

    uri_prefix: /images/products
    upload_destination: '%kernel.project_dir%/public/images/products' 

We can deduce that the destination can be build by prepend the %kernel.project_dir%/public value.

So, if the parameter is omitted, we can define default value within the compiler pass.

garak commented 3 months ago

This seems to me just a way to get yet another small option, which provides very little value for the user, while moving the burden of testing on the maintainers. By the way, this only applies for a local filesystem.

laurentmuller commented 3 months ago

OK.

So I will close it.