U
U
uRoot2021-04-21 17:43:55
JavaScript
uRoot, 2021-04-21 17:43:55

Why doesn't drag n drop upload work in Chrome?

How to make drag and drop file uploads work in all browsers?
There is a script: https://codesandbox.io/s/crimson-night-1gyib?file=...
If you drag two pictures to the DnD zone and release, then everything is ok in FF, but there are no files in Chrome (see screenshot)
6080385628dc9039182444.png

PS steal files for yourself, otherwise something on codesandbox.io works in FF as well

Or look at the DnD implementation from the same Mozil MDN: jsfiddle.net/kgzevn5w

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
ReactLover, 2021-04-21
@ReactLover

Everything works great here and there. Just in chrome, a link to the object is displayed in the console. When you open it, it shows its state at the moment of OPENING, and not at the moment of withdrawal. Output to consoleevent.dataTransfer.files

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question