【问题标题】:Using blueimp jQuery File Upload with PUT to WCF使用 blueimp jQuery 文件上传和 PUT 到 WCF
【发布时间】:2011-08-12 20:43:57
【问题描述】:

我正在使用位于https://github.com/blueimp/jQuery-File-Upload 的 blueimp jQuery 文件上传插件,根据文档,我应该能够使用 HTTP PUT 上传文件。这是我的初始化

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

根据 stackoverflow 的答案 file upload to wcf using jqueryHow to upload a file using an HTTP "PUT" using JQuery? 这应该是可能的,但是当我使用提琴手检查线路上的数据时,我看到标题设置正确但正文为空。

有没有人有一个在 IE9 中从本地文件中使用这个插件的工作示例?

【问题讨论】:

    标签: jquery ajax wcf jquery-file-upload blueimp


    【解决方案1】:

    只有支持 XHR 文件上传的浏览器才支持使用 HTTP PUT 请求上传文件(请参阅Browser support information)。

    jQuery File Upload 插件利用了 IE 和 Opera 的 iframe 传输插件。
    iframe 传输文件上传依赖于仅支持文件上传的 HTTPS POST 请求的标准 HTML 表单。

    我已更新 Options documentation 并附上解释此限制的说明。

    【讨论】:

      猜你喜欢
      • 2014-06-18
      • 2019-01-26
      • 2016-01-08
      • 1970-01-01
      • 2014-12-01
      • 1970-01-01
      • 2013-02-13
      • 2013-04-29
      • 2015-09-29
      相关资源
      最近更新 更多