Benno
Benno

Reputation: 3008

JavaScript Drag drop documents/files

Is it possible to drag and drop files (not images and not links to files) from one browser window into a droppable file uploader?

I.E. I know you can drag from your desktop to the browser, but how about between browser windows or even between tabs?

My website's backend generates PDF documents, and it'd be great if they could be dragged straight into gmail attachment drop box from the icon in my backend instead of downloading them then uploading them, lol.

Just not sure how to do it or if its possible... Any ideas?

Upvotes: 0

Views: 293

Answers (1)

Greg
Greg

Reputation: 31378

I don't think you can drag files that haven't been downloaded to the client. Files are usually stored on a server and linked to from the browser...images however are downloaded so the client machine has the file at hand to use.

Your file uploader could "on drop" do a web request for the file?

Upvotes: 1

Related Questions