alessiomaffeis / vue-picture-input

Mobile-friendly picture file input component for Vue.js 2-3 with image preview, drag and drop, EXIF orientation, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Change fileInput's files value on drag and drop.

smketterer opened this issue · comments

Hi there. First of all, thanks for your work on this component.

Earlier today I had issues with the file uploader not updating the input element's file value on drag-and-drop. This was creating problems as I was using Django's forms without any trickery. After some searching I found this Stack Overflow answer which shows that you can set file inputs from FileLists – in this component, this can be accomplished by putting this.$refs.fileInput.files = files near the end of onFileChange.

Is there a reason this isn't implemented currently?

If not, I can create a PR if you wish.

Hi, thank you very much, I am glad you found it useful.

I don't think there is a specific reason, you can file a PR, if you like! :)

Will be fixed in 3.0.1