Closed antherkiv closed 8 years ago
Strange, I'm not able to reproduce this. Could you provide an error message or something, that would make it more easy to take care of it!
I found the problem for some reason when the code it's precompiled fails:
draft-js-plugins-dnd-plugin onDropFile onDropInnerFile function, this piece of code it's the problem:
var data = { files: [], formData: formData }; for (var key in files) { if (files[key]) { data.formData.append('files', files[key]); data.files.push(files[key]); }
(The example doesn't fails because of that).
Then the function getIndexBy it's attached with files and when the flow it's on readFiles ( because it's not a file readFile function fails and the promise never resolve).
I'm sorry I don't have too much free time.
Sorry for the extended abscence. I see the problem now, though I still wasn't able to reproduce it. I've added a check:
if (files[key] && files[key] instanceof File)
This should fix the problem for you, but I'm not sure why it gets called 2 times in the first place.
I'm closing this, but if you still got an issue with that, feel free to re-open it!
Hello when I drop an image over the editor, this pass twice in dnd plugin creator, the second time without file and crash, I looking why now.