2014-05-19 49 views
0

我正在使用blueimp插件上传文件。它在本地服务器上工作,但是当我尝试使用不同的域文件时,它不保存在那里。请帮我解决我必须做的事情。我写了下面的代码在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' 
     ) 
    ); 

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

回答

1

当我设置WithCrentials:false 它的作品适合我。