I am using the blueimp jQuery file upload plug-in located here https://github.com/blueimp/jQuery-File-Upload and according to the documentation I should be able to upload a file using HTTP PUT. Here is my init

$('#fileupload').fileupload({
    url: baseServer + '/image/upload',
    type: 'PUT',
    multipart: false
}

According to the stackoverflow answers file upload to wcf using jquery and How to upload a file using an HTTP "PUT" using JQuery? this should be possible however when I examine the data on the wire using fiddler, I see that the headers are set correctly but the body is empty.

Does anyone have a working example of using this plug-in in IE9 from a local file?

有帮助吗?

解决方案

File uploads using HTTP PUT requests are only supported by browsers with support for XHR file uploads (see Browser support information).

The jQuery File Upload plugin makes use of the iframe transport plugin for IE and Opera.
Iframe transport file uploads rely on standard HTML forms which only support HTTPS POST requests for file uploads.

I've updated the Options documentation with a note explaining this limitation.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top