开发者

dojo or jquery javascript send binary file using ajax

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


you cant upload files from your local computer using javascript without using the built in upload function (the form).


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜