diff --git a/src/polyfills.ts b/src/polyfills.ts index d68672ff..da130aca 100644 --- a/src/polyfills.ts +++ b/src/polyfills.ts @@ -19,20 +19,20 @@ */ /** IE9, IE10 and IE11 requires all of the following polyfills. **/ -// import 'core-js/es6/symbol'; -// import 'core-js/es6/object'; -// import 'core-js/es6/function'; -// import 'core-js/es6/parse-int'; -// import 'core-js/es6/parse-float'; -// import 'core-js/es6/number'; -// import 'core-js/es6/math'; -// import 'core-js/es6/string'; -// import 'core-js/es6/date'; -// import 'core-js/es6/array'; -// import 'core-js/es6/regexp'; -// import 'core-js/es6/map'; -// import 'core-js/es6/weak-map'; -// import 'core-js/es6/set'; +import 'core-js/es6/symbol'; +import 'core-js/es6/object'; +import 'core-js/es6/function'; +import 'core-js/es6/parse-int'; +import 'core-js/es6/parse-float'; +import 'core-js/es6/number'; +import 'core-js/es6/math'; +import 'core-js/es6/string'; +import 'core-js/es6/date'; +import 'core-js/es6/array'; +import 'core-js/es6/regexp'; +import 'core-js/es6/map'; +import 'core-js/es6/weak-map'; +import 'core-js/es6/set'; /** IE10 and IE11 requires the following for NgClass support on SVG elements */ // import 'classlist.js'; // Run `npm install --save classlist.js`. @@ -40,27 +40,21 @@ /** IE10 and IE11 requires the following for the Reflect API. */ // import 'core-js/es6/reflect'; - /** Evergreen browsers require these. **/ // Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove. import 'core-js/es7/reflect'; - /** * Required to support Web Animations `@angular/platform-browser/animations`. * Needed for: All but Chrome, Firefox and Opera. http://caniuse.com/#feat=web-animation **/ // import 'web-animations-js'; // Run `npm install --save web-animations-js`. - - /*************************************************************************************************** * Zone JS is required by default for Angular itself. */ import 'zone.js/dist/zone'; // Included with Angular CLI. - - /*************************************************************************************************** * APPLICATION IMPORTS */ diff --git a/src/uploadx/src/uploader.ts b/src/uploadx/src/uploader.ts index 37e27b41..e14577fb 100644 --- a/src/uploadx/src/uploader.ts +++ b/src/uploadx/src/uploader.ts @@ -119,8 +119,8 @@ export class Uploader implements UploaderOptions { return this.resume(); } const xhr = new XMLHttpRequest(); - xhr.responseType = 'json'; xhr.open(this.method, this.options.url, true); + xhr.responseType = 'json'; if (!!this.options.withCredentials) { xhr.withCredentials = true; } @@ -149,10 +149,10 @@ export class Uploader implements UploaderOptions { */ private resume(): void { const xhr: XMLHttpRequest = XHRFactory.getInstance(); + xhr.open('PUT', this.url, true); if (xhr.responseType !== 'json') { xhr.responseType = 'json'; } - xhr.open('PUT', this.url, true); if (!!this.options.withCredentials) { xhr.withCredentials = true; } @@ -210,11 +210,10 @@ export class Uploader implements UploaderOptions { end = end > this.size ? this.size : end; const chunk: Blob = this.file.slice(start, end); const xhr: XMLHttpRequest = XHRFactory.getInstance(); + xhr.open('PUT', this.url, true); if (xhr.responseType !== 'json') { xhr.responseType = 'json'; } - - xhr.open('PUT', this.url, true); if (!!this.options.withCredentials) { xhr.withCredentials = true; }