Closed Donniewiko closed 9 years ago
@Donniewiko I still think if xdomain XMLHttpRequest manipulation happens after ng-file-upload it should work without problem since xhr
in that case will be the overwritten one from ng-file-upload which could handle setting a function as a request header.
Could you create a jsfiddle for this? I could submit a PR after that to fix the issue
Hi Danial,
I created an error version and a working version:
error: http://plnkr.co/edit/lJHMedHfRRqn4Q0bUJkF working: http://plnkr.co/edit/2tlEKTTEZyqp1otqCVmH
Please dont mind my coding. i created this quickly. But you will see the error in the console when you upload a file in the error version, and a result in the working version.
Kind regards
Ok I pushed a fix that would get rid of the error, but I don't think the upload progress would work. actually file progress should work too.
Hi,
I submitted this issue also to the ng-file-upload since it first occured since i added that module.
However, i narrowed the issue down to the following code:
https://github.com/jpillora/xdomain/blob/gh-pages/dist/xdomain.js#L470
The problemen is that ng-file-upload adds a header:
__SetXhr
(or something similar). Above code then tries to set the request header. However it fails to do so, since the_SetXHR
is a function. In my particular case, i fixed the issue when i modified the code to:Im not sure if i should mark this as a bug (with a proposed fix).