angular-file-upload icon indicating copy to clipboard operation
angular-file-upload copied to clipboard

Bug in IE setting xhr.timeout before xhr.open() in version 2.6.0

Open Udofalcon opened this issue 5 years ago • 4 comments

The latest 2.6.0 update introduced a bug with Internet Explorer where we're setting xhr.timeout before calling xhr.open(). Internet Explorer cannot handle setting those keys on the XHR object without the request being open.

image

We encountered this bug while trying to upload a file, but we were able to boil the issue down to just this section: https://github.com/nervgh/angular-file-upload/blob/master/src/services/FileUploader.js#L516-L525

Moving xhr.timeout = item.timeout || 0; after xhr.open(item.method, item.url, true); should resolve this issue.

This same bug doesn't seem to be present in Firefox, Chrome, or Edge.

Udofalcon avatar Jun 24 '20 17:06 Udofalcon

Can you provide IE version?

ygj6 avatar Jul 02 '20 04:07 ygj6

IE 11. Specifically 11.836.18362.0.

Udofalcon avatar Jul 02 '20 15:07 Udofalcon

IE 11. Specifically 11.836.18362.0.

Thanks for open this issue

ygj6 avatar Jul 03 '20 06:07 ygj6

I know this is almost not maintained, but could you also make this so that the fix would execute when source maps are in use (minified or not). Also it would be nice to have the version via npmjs.com.

luumik avatar Aug 19 '20 14:08 luumik