Techsoda
Techsoda

Reputation: 61

Drag and drop file functionality to browser

I am looking for a way to mimic Windows Live functionality on dragging files from windows explorer onto a web page in a browser and capturing the filename. I think this functionality is through the following control

Microsoft.Live.Folders.RichUpload.UploadControl

Any pointers in the right direction to take care of a client

Upvotes: 1

Views: 1533

Answers (1)

BenAlabaster
BenAlabaster

Reputation: 39806

I did a bunch of digging to figure out if this was possible without embedding an Active-X control and it seems that you can't. There are various libraries out there that you can use from within your script to do this but the primary reason is this:

Javascript runs in a sandbox environment which doesn't have access to the file system this is for security purposes. Likewise it therefore doesn't have access to OLE without use of an Active-X control designed for accessing that type of structure.

I found a tutorial that demonstrates here: http://straxus.javadevelopersjournal.com/creating_a_mozillafirefox_drag_and_drop_file_upload_script_p.htm

Upvotes: 1

Related Questions