Reputation: 373
I want to upload a static file on my drive like C:\someplace\somefile.doc THe file and location is always the same.
I need to do an ajax POST to a url to send this file using only javascript...
Could someone provide some idea or example how this could be done using dojo or jquery...is this possible?
I seen examples where it uses a form...but that is not I want.
thanks
Upvotes: 0
Views: 1355
Reputation: 5663
MDN has an article on how to do it:
https://developer.mozilla.org/en/Using_files_from_web_applications
Check 'Handling the upload process for a file'.
They don't use jQuery but the new HTML5 File AP and XmlHttpRequest 2.
Upvotes: 0
Reputation: 146
you cant upload files from your local computer using javascript without using the built in upload function (the form).
Upvotes: 1