-
inject_on_load
config param defaults to false. Set it to true if you want to keep your old behavior. -
the
NamerInterface
andDirectoryNamerInterface
were modified.
-
getUriPrefix
default value is now /uploads -
delete_on_update
config param added. It defaults to true.
-
gaufrette and KnpGaufretteBundle are now soft dependencies
-
storage
configuration entry added. -
web_dir_name
configuration entry deprecated. -
mapping
:upload_dir
configuration entry renamed tomapping
:upload_destination
-
mapping
:uri_prefix
configuration entry added -
The old
vich_uploader.uploader
service has been split into two new services for a more modular, separation of concerns approach. The new services arevich_uploader.storage.gaufrette
andvich_uploader.file_injector
. The storage service is responsible for saving and removing files as well as resolving their path. The injector service is responsible for injectingFile
instances back into the object upon retrieval from the datastore.
-
Annotations have changed namespace from
Vich\UploaderBundle\Annotation
toVich\UploaderBundle\Mapping\Annotation
. You will need to update youruse
statement for the annotations used in your entity or document classes. -
The
mappings
configuration entry prototype has had a new option added to it. Theinject_on_load
config option specifies whether or not the uploadable fields should have an instnace ofSymfony\Component\HttpFoundation\File\File
created and injected into the property upon retrieval from the datastore. THis option has a default value oftrue
.