File not assigned to the input when using dropzone
Closed this issue · 1 comments
When using this options:
$('input[type="file"]').fileupload({
autoUpload: false,
replaceFileInput: false
});
If I click on the file input and select a file, I can see the filename properly set to the file input.
I can even submit the form without using the upload API and the server will receive the file.
But if I use the same config using a dropzone:
$('input[type="file"]').fileupload({
autoUpload: false,
replaceFileInput: false,
dropZone: $('#myEl')
});
If I drop a file in the dropzone element, the file input is still displayed as empty.
If I submit the form without using the upload API and the server will receive nothing.
Is it possible to assign the file to the input using dropZone
option?
Hi @Seb33300, unfortunately it is not possible to attach an existing File
object to a file input - this is a browser limitation.
However you can still upload files without a form, e.g. using the API:
https://github.com/blueimp/jQuery-File-Upload/wiki/API#programmatic-file-upload