DropZone supports a number of options, why aren't these options being passed through init ?
The issue can be seen here:
FileUpload.prototype.bindUploader = function() {
this.uploaderOptions = {
url: this.options.url,
paramName: this.options.paramName,
clickable: this.$uploadButton.get(0),
previewsContainer: this.$filesContainer.get(0),
maxFiles: !this.options.isMulti ? 1 : null,
headers: {}
}
...
this.dropzone = new Dropzone(this.$el.get(0), this.uploaderOptions)
Only two options are passed through to Dropzone directly on init
This plugin would be more flexible on frontend if we could pass dropzone options as part of the fileUploader init.
Use case Example: I want my single image uploaders to offer more than one clickable upload element, and I would like to override the default onClickSuccessObject behaviour. This would be easily done if we had a more flexible constructor and some events that allow default behaviour to be overridden.
Example of how one might expect to implement this on construct:
var singleImageUploader = $('.singleImageUploader ').fileUploader({
isMulti : false
dropzoneOptions : {
clickable : [ '.button', '.image-container' ]
},
});
singleImageUploader .on('onClickSuccessObject', function(ev){
//do something other than opening the uploaded file in a new window
});
I cant see a straight forward way to do this using the fileUploader as is. Have I missed something, or is the fileUploader obj being unnecessarily restrictive?
DropZone supports a number of options, why aren't these options being passed through init ?
The issue can be seen here:
Only two options are passed through to Dropzone directly on init
This plugin would be more flexible on frontend if we could pass dropzone options as part of the fileUploader init.
Use case Example: I want my single image uploaders to offer more than one clickable upload element, and I would like to override the default onClickSuccessObject behaviour. This would be easily done if we had a more flexible constructor and some events that allow default behaviour to be overridden.
Example of how one might expect to implement this on construct:
I cant see a straight forward way to do this using the fileUploader as is. Have I missed something, or is the fileUploader obj being unnecessarily restrictive?