fex-team / webuploader

It's a new file uploader solution!
http://fex.baidu.com/webuploader/
BSD 3-Clause "New" or "Revised" License
7.71k stars 2.34k forks source link

IE9以下上传失败问题,看了相关的issues都办法解决 #2961

Open aweneves opened 5 years ago

aweneves commented 5 years ago

配了headers

uploader.on('uploadBeforeSend ', function(object, data, headers) {
        headers['Access-Control-Allow-Origin'] = '*';
        headers['Access-Control-Request-Headers'] = 'content-type';
        headers['Access-Control-Request-Method'] = 'POST';
 });

服务器根目录也加了crossdomain.xml,能正常访问

<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" />
<allow-http-request-headers-from domain="*" headers="*"/>
</cross-domain-policy>

还是会上传失败,请问是什么原因?

LSL1618 commented 5 years ago

为啥一定要跨域,用同域然后借助代理服务不是挺好嘛。