HTML5 drag and drop upload - how to limit only local files
I'm working on an HTML5 image drag-and-drop project and encounter a problem:
If a user drag an image that is already on the page, the onDragEnter/onDragOver events are still 开发者_StackOverflowtriggered.
Is there a way to trigger the event only if the file comes from the local computer (drag from desktop, folders, etc.), not from the page itself?
Could you set the draggable
attribute on all page images to false
?
精彩评论