HTML5 Drag-Drop - How to know the difference between local files and clipboard?

85 Views Asked by At

OK, so I have built a drag-n-drop system where javascript checks whether the files are, well, files, and not folders, pieces of text or hyperlinks. The problem is, javascript seems to not know the difference between files from clipboard and local files using the details from e.dataTransfer.

For example: I can drag an image directly from a website in the browser to the drag-n-drop area, and javascript will automatically treat it like it's a local file. Is there anyway I can prevent javascript from considering any sort of files other than local files?

0

There are 0 best solutions below