【问题标题】:cross domain file upload in blueimpblueimp中的跨域文件上传
【发布时间】:2014-05-19 11:05:22
【问题描述】:

我正在使用 blueimp 插件上传文件。它在本地服务器上运行,但是当我尝试使用不同的域文件时,它不会保存在那里。请帮助我完成我必须做的事情。我写了以下代码

$('#fileupload').fileupload({
        // Uncomment the following to send cross-domain cookies:
        xhrFields: {withCredentials: true},
        url: 'http://192.168.1.205/EncoderService/API/Default.aspx'
    });

    // Enable iframe cross-domain access via redirect option:
    $('#fileupload').fileupload(
        'option',
        'redirect',
        window.location.href.replace(
            /\/[^\/]*$/,
            '/cors/result.html?%s'
        )
    );

是否需要在服务器端编写代码?

【问题讨论】:

    标签: file-upload cross-domain blueimp


    【解决方案1】:

    当我设置 WithCrentials: false 它对我有用。

    【讨论】:

      猜你喜欢
      • 2012-12-21
      • 1970-01-01
      • 2015-04-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多