Download the PHP package ethsam/symfony-dropzone without Composer
On this page you can find all versions of the php package ethsam/symfony-dropzone. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package symfony-dropzone
Symfony DropzoneType
Extends the SymfonyForm component. Adds the new form type DropzoneType Use DropzoneType in form with relation other entity "One Form contain 2 entities relation".
Example : form with "Item" entity and DropZoneType link with "Attachment" entity
This is custom version of : https://github.com/emr-dev/symfony-dropzone
Installing
composer require ethsam/symfony-dropzone
Add the dropzone library to your project in template
Usage
Examples route uploadHandler/removeHandler
Example get data convert to array and findby for persist
Options
Name | Default | Description |
---|---|---|
class | null | File Entity |
choice_src | "src" | property that contains src |
uploadHandler | null | Symfony route name for upload |
removeHandler | null | Symfony route name for remove |
multiple | true | Set to false if you have a one to one relationship |
maxFiles | 1 | If not null defines how many files this Dropzone handles. |
addRemoveLinks | true | If true, this will add a link to every file preview to remove or cancel (if already uploading) the file. |
headers | [] | An optional object to send additional headers to the server. Headers is array. Eg: ['Authorization' => 'Bearer XXXXXX'] |
formData | [] | Additional data that will be sent to FormData. Eg: ['key' => 'value'] |
uploadHandlerMethod | "POST" | Can be changed to "PUT" if necessary. |
removeHandlerMethod | "DELETE" | Can be changed to "POST" if necessary. |
withCredentials | 0 | Will be set on the XHRequest. |
thumbnailWidth | 120 | If null, the ratio of the image will be used to calculate it. |
thumbnailHeight | 120 | The same as thumbnailWidth. If both are null, images will not be resized. |
thumbnailMethod | "crop" | How the images should be scaled down in case both, thumbnailWidth and thumbnailHeight are provided. Can be either contain or crop. |
resizeWidth | null | If set, images will be resized to these dimensions before being uploaded. If only one, resizeWidth or resizeHeight is provided, the original aspect ratio of the file will be preserved. |
resizeHeight | null | See resizeWidth. |
resizeMimeType | null | The mime type of the resized image (before it gets uploaded to the server). If null the original mime type will be used. To force jpeg, for example, use image/jpeg. See resizeWidth for more information. |
resizeMethod | "contain" | How the images should be scaled down in case both, resizeWidth and resizeHeight are provided. Can be either contain or crop. |
filesizeBase | 1024 | - |
ignoreHiddenFiles | true | Whether hidden files in directories should be ignored. |
acceptedFiles | null | Eg.: image/*,application/pdf,.psd |
autoProcessQueue | true | If false, files will be added to the queue but the queue will not be processed automatically. This can be useful if you need some additional user input before sending files (or if you want want all files sent at once). If you're ready to send the file simply call myDropzone.processQueue(). |
autoQueue | true | If false, files added to the dropzone will not be queued by default. You'll have to call enqueueFile(file) manually. |
previewsContainer | null | Defines where to display the file previews – if null the Dropzone element itself is used. Can be a CSS selector. |
License MIT
All versions of symfony-dropzone with dependencies
PHP Build Version
Package Version
Requires
symfony/dependency-injection Version
>4.3
The package ethsam/symfony-dropzone contains the following files
Loading the files please wait ....