From 829986e74ed08e3e00ca6b88695bb5649a0bbc2e Mon Sep 17 00:00:00 2001 From: yuangongji Date: Thu, 20 Aug 2020 12:14:43 +0800 Subject: [PATCH] Release 2.6.1 --- dist/angular-file-upload.js | 5 ++--- dist/angular-file-upload.js.map | 2 +- dist/angular-file-upload.min.js | 4 ++-- dist/angular-file-upload.min.js.map | 2 +- package.json | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/dist/angular-file-upload.js b/dist/angular-file-upload.js index 27f0b283..5234f1bb 100644 --- a/dist/angular-file-upload.js +++ b/dist/angular-file-upload.js @@ -1,5 +1,5 @@ /* - angular-file-upload v2.6.0 + angular-file-upload v2.6.1 https://github.com/nervgh/angular-file-upload */ @@ -770,8 +770,6 @@ return /******/ (function(modules) { // webpackBootstrap _this5._onCompleteItem(item, response, xhr.status, headers); }; - xhr.timeout = item.timeout || 0; - xhr.ontimeout = function (e) { var headers = _this5._parseHeaders(xhr.getAllResponseHeaders()); var response = "Request Timeout."; @@ -781,6 +779,7 @@ return /******/ (function(modules) { // webpackBootstrap xhr.open(item.method, item.url, true); + xhr.timeout = item.timeout || 0; xhr.withCredentials = item.withCredentials; forEach(item.headers, function (value, name) { diff --git a/dist/angular-file-upload.js.map b/dist/angular-file-upload.js.map index 8e46e445..5035b469 100644 --- a/dist/angular-file-upload.js.map +++ b/dist/angular-file-upload.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap d7c31d10b5c47523a595","webpack:///./src/index.js","webpack:///./src/config.json","webpack:///./src/values/options.js","webpack:///./src/services/FileUploader.js","webpack:///./src/services/FileLikeObject.js","webpack:///./src/services/FileItem.js","webpack:///./src/services/FileDirective.js","webpack:///./src/services/FileSelect.js","webpack:///./src/services/Pipeline.js","webpack:///./src/services/FileDrop.js","webpack:///./src/services/FileOver.js","webpack:///./src/directives/FileSelect.js","webpack:///./src/directives/FileDrop.js","webpack:///./src/directives/FileOver.js"],"names":["angular","module","CONFIG","name","value","options","factory","serviceFileUploader","serviceFileLikeObject","serviceFileItem","serviceFileDirective","serviceFileSelect","serviceFileDrop","serviceFileOver","servicePipeline","directive","directiveFileSelect","directiveFileDrop","directiveFileOver","run","FileUploader","FileLikeObject","FileItem","FileDirective","FileSelect","FileDrop","FileOver","Pipeline","url","alias","headers","queue","progress","autoUpload","removeAfterUpload","method","filters","formData","queueLimit","Number","MAX_VALUE","withCredentials","disableMultipart","__identity","bind","copy","extend","forEach","isObject","isNumber","isDefined","isArray","isUndefined","element","fileUploaderOptions","$rootScope","$http","$window","$timeout","File","FormData","settings","isUploading","_nextIndex","_directives","select","drop","over","unshift","fn","_queueLimitFilter","_folderFilter","addToQueue","files","incomingQueue","isArrayLikeObject","Array","prototype","slice","call","arrayOfFilters","_getFilters","count","length","addedFileItems","next","something","shift","done","fileLikeObject","isFile","pipes","_convertFiltersToPipes","pipeline","onThrown","err","originalFilter","pipe","args","_onWhenAddingFileFailed","onSuccessful","fileItem","push","_onAfterAddingFile","exec","_onAfterAddingAll","_getTotalProgress","_render","uploadAll","removeFromQueue","index","getIndexOfItem","item","cancel","splice","_destroy","clearQueue","remove","uploadItem","transport","isHTML5","_prepareToUploading","_onBeforeUploadItem","isCancel","cancelItem","prop","abort","dummy","undefined","onNextTick","_onCancelItem","_onCompleteItem","items","getNotUploadedItems","filter","upload","cancelAll","constructor","isFileLikeObject","indexOf","isUploaded","getReadyItems","isReady","sort","item1","item2","destroy","key","object","onAfterAddingAll","fileItems","onAfterAddingFile","onWhenAddingFileFailed","onBeforeUploadItem","onProgressItem","onProgressAll","onSuccessItem","response","status","onErrorItem","onCancelItem","onCompleteItem","onTimeoutItem","onCompleteAll","notUploaded","uploaded","ratio","current","Math","round","names","match","map","isAsync","$$phase","$apply","size","type","_isSuccessCode","_transformResponse","headersGetter","_headersGetter","defaults","transformResponse","transformFn","_parseHeaders","parsed","val","i","split","line","trim","toLowerCase","parsedHeaders","_xhrTransport","xhr","_xhr","XMLHttpRequest","sendable","obj","append","_file","file","TypeError","onprogress","event","lengthComputable","loaded","total","_onProgressItem","onload","getAllResponseHeaders","gist","onerror","_onErrorItem","onabort","timeout","ontimeout","e","_onTimeoutItem","open","setRequestHeader","send","_iframeTransport","form","iframe","Date","now","input","_input","timer","isTimedOut","_form","replaceWith","element_","action","target","enctype","encoding","html","contentDocument","body","innerHTML","clearTimeout","_onSuccessItem","unbind","after","setTimeout","submit","_onBeforeUpload","_onProgress","_onSuccess","_onError","_onCancel","_onComplete","nextItem","_onTimeout","inherit","source","Object","create","super_","$inject","isElement","isString","fileOrInput","isInput","fakePathOrObject","postfix","_createFromFakePath","path","lastModifiedDate","lastIndexOf","_createFromObject","$compile","uploader","some","isSuccess","isError","_replaceNode","message","code","onBeforeUpload","onProgress","onSuccess","onError","onCancel","onComplete","onTimeout","clone","scope","css","_saveLinks","events","extendedOptions","$destroy","change","removeAttr","getOptions","getFilters","isEmptyAfterSelection","attr","onChange","$q","Error","deferred","defer","onFulfilled","onRejected","promise","then","isDone","Boolean","dragover","dragleave","onDrop","transfer","_getTransfer","_preventAndStop","_removeOverClass","onDragOver","_haveFiles","types","dropEffect","_addOverClass","onDragLeave","currentTarget","dataTransfer","originalEvent","preventDefault","stopPropagation","contains","addOverClass","removeOverClass","overClass","addClass","getOverClass","removeClass","$parse","link","attributes","$eval"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;;;;;;;ACtCA;;AAGA;;;;AAGA;;;;AAGA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AACA;;;;AAGA;;;;AACA;;;;AACA;;;;;;AAGAA,SACKC,MADL,CACYC,iBAA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2N,OAAX,GAAqB,CACjB,cADiB,EAEjB,UAFiB,CAArB,C","file":"angular-file-upload.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"angular-file-upload\"] = factory();\n\telse\n\t\troot[\"angular-file-upload\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap d7c31d10b5c47523a595","'use strict';\r\n\r\n\r\nimport CONFIG from './config.json';\r\n\r\n\r\nimport options from './values/options'\r\n\r\n\r\nimport serviceFileUploader from './services/FileUploader';\r\nimport serviceFileLikeObject from './services/FileLikeObject';\r\nimport serviceFileItem from './services/FileItem';\r\nimport serviceFileDirective from './services/FileDirective';\r\nimport serviceFileSelect from './services/FileSelect';\r\nimport servicePipeline from './services/Pipeline';\r\nimport serviceFileDrop from './services/FileDrop';\r\nimport serviceFileOver from './services/FileOver';\r\n\r\n\r\nimport directiveFileSelect from './directives/FileSelect';\r\nimport directiveFileDrop from './directives/FileDrop';\r\nimport directiveFileOver from './directives/FileOver';\r\n\r\n\r\nangular\r\n .module(CONFIG.name, [])\r\n .value('fileUploaderOptions', options)\r\n .factory('FileUploader', serviceFileUploader)\r\n .factory('FileLikeObject', serviceFileLikeObject)\r\n .factory('FileItem', serviceFileItem)\r\n .factory('FileDirective', serviceFileDirective)\r\n .factory('FileSelect', serviceFileSelect)\r\n .factory('FileDrop', serviceFileDrop)\r\n .factory('FileOver', serviceFileOver)\r\n .factory('Pipeline', servicePipeline)\r\n .directive('nvFileSelect', directiveFileSelect)\r\n .directive('nvFileDrop', directiveFileDrop)\r\n .directive('nvFileOver', directiveFileOver)\r\n .run([\r\n 'FileUploader',\r\n 'FileLikeObject',\r\n 'FileItem',\r\n 'FileDirective',\r\n 'FileSelect',\r\n 'FileDrop',\r\n 'FileOver',\r\n 'Pipeline',\r\n function(FileUploader, FileLikeObject, FileItem, FileDirective, FileSelect, FileDrop, FileOver, Pipeline) {\r\n // only for compatibility\r\n FileUploader.FileLikeObject = FileLikeObject;\r\n FileUploader.FileItem = FileItem;\r\n FileUploader.FileDirective = FileDirective;\r\n FileUploader.FileSelect = FileSelect;\r\n FileUploader.FileDrop = FileDrop;\r\n FileUploader.FileOver = FileOver;\r\n FileUploader.Pipeline = Pipeline;\r\n }\r\n ]);\r\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","module.exports = {\"name\":\"angularFileUpload\"}\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/config.json\n// module id = 1\n// module chunks = 0 1","'use strict';\r\n\r\n\r\nexport default {\r\n url: '/',\r\n alias: 'file',\r\n headers: {},\r\n queue: [],\r\n progress: 0,\r\n autoUpload: false,\r\n removeAfterUpload: false,\r\n method: 'POST',\r\n filters: [],\r\n formData: [],\r\n queueLimit: Number.MAX_VALUE,\r\n withCredentials: false,\r\n disableMultipart: false\r\n};\n\n\n// WEBPACK FOOTER //\n// ./src/values/options.js","'use strict';\r\n\r\n\r\nimport CONFIG from './../config.json';\r\n\r\n\r\nlet {\r\n bind,\r\n copy,\r\n extend,\r\n forEach,\r\n isObject,\r\n isNumber,\r\n isDefined,\r\n isArray,\r\n isUndefined,\r\n element\r\n } = angular;\r\n\r\n\r\nexport default function __identity(fileUploaderOptions, $rootScope, $http, $window, $timeout, FileLikeObject, FileItem, Pipeline) {\r\n \r\n \r\n let {\r\n File,\r\n FormData\r\n } = $window;\r\n \r\n \r\n class FileUploader {\r\n /**********************\r\n * PUBLIC\r\n **********************/\r\n /**\r\n * Creates an instance of FileUploader\r\n * @param {Object} [options]\r\n * @constructor\r\n */\r\n constructor(options) {\r\n var settings = copy(fileUploaderOptions);\r\n \r\n extend(this, settings, options, {\r\n isUploading: false,\r\n _nextIndex: 0,\r\n _directives: {select: [], drop: [], over: []}\r\n });\r\n\r\n // add default filters\r\n this.filters.unshift({name: 'queueLimit', fn: this._queueLimitFilter});\r\n this.filters.unshift({name: 'folder', fn: this._folderFilter});\r\n }\r\n /**\r\n * Adds items to the queue\r\n * @param {File|HTMLInputElement|Object|FileList|Array} files\r\n * @param {Object} [options]\r\n * @param {Array|String} filters\r\n */\r\n addToQueue(files, options, filters) {\r\n let incomingQueue = this.isArrayLikeObject(files) ? Array.prototype.slice.call(files): [files];\r\n var arrayOfFilters = this._getFilters(filters);\r\n var count = this.queue.length;\r\n var addedFileItems = [];\r\n\r\n let next = () => {\r\n let something = incomingQueue.shift();\r\n \r\n if (isUndefined(something)) {\r\n return done();\r\n }\r\n \r\n let fileLikeObject = this.isFile(something) ? something : new FileLikeObject(something);\r\n let pipes = this._convertFiltersToPipes(arrayOfFilters);\r\n let pipeline = new Pipeline(pipes);\r\n let onThrown = (err) => {\r\n let {originalFilter} = err.pipe;\r\n let [fileLikeObject, options] = err.args;\r\n this._onWhenAddingFileFailed(fileLikeObject, originalFilter, options);\r\n next();\r\n };\r\n let onSuccessful = (fileLikeObject, options) => {\r\n let fileItem = new FileItem(this, fileLikeObject, options);\r\n addedFileItems.push(fileItem);\r\n this.queue.push(fileItem);\r\n this._onAfterAddingFile(fileItem);\r\n next();\r\n };\r\n pipeline.onThrown = onThrown;\r\n pipeline.onSuccessful = onSuccessful;\r\n pipeline.exec(fileLikeObject, options);\r\n };\r\n \r\n let done = () => {\r\n if(this.queue.length !== count) {\r\n this._onAfterAddingAll(addedFileItems);\r\n this.progress = this._getTotalProgress();\r\n }\r\n\r\n this._render();\r\n if (this.autoUpload) this.uploadAll();\r\n };\r\n \r\n next();\r\n }\r\n /**\r\n * Remove items from the queue. Remove last: index = -1\r\n * @param {FileItem|Number} value\r\n */\r\n removeFromQueue(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n if(item.isUploading) item.cancel();\r\n this.queue.splice(index, 1);\r\n item._destroy();\r\n this.progress = this._getTotalProgress();\r\n }\r\n /**\r\n * Clears the queue\r\n */\r\n clearQueue() {\r\n while(this.queue.length) {\r\n this.queue[0].remove();\r\n }\r\n this.progress = 0;\r\n }\r\n /**\r\n * Uploads a item from the queue\r\n * @param {FileItem|Number} value\r\n */\r\n uploadItem(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n var transport = this.isHTML5 ? '_xhrTransport' : '_iframeTransport';\r\n\r\n item._prepareToUploading();\r\n if(this.isUploading) return;\r\n\r\n this._onBeforeUploadItem(item);\r\n if (item.isCancel) return;\r\n\r\n item.isUploading = true;\r\n this.isUploading = true;\r\n this[transport](item);\r\n this._render();\r\n }\r\n /**\r\n * Cancels uploading of item from the queue\r\n * @param {FileItem|Number} value\r\n */\r\n cancelItem(value) {\r\n var index = this.getIndexOfItem(value);\r\n var item = this.queue[index];\r\n var prop = this.isHTML5 ? '_xhr' : '_form';\r\n if (!item) return;\r\n item.isCancel = true;\r\n if(item.isUploading) {\r\n // It will call this._onCancelItem() & this._onCompleteItem() asynchronously\r\n item[prop].abort();\r\n } else {\r\n let dummy = [undefined, 0, {}];\r\n let onNextTick = () => {\r\n this._onCancelItem(item, ...dummy);\r\n this._onCompleteItem(item, ...dummy);\r\n };\r\n $timeout(onNextTick); // Trigger callbacks asynchronously (setImmediate emulation)\r\n }\r\n }\r\n /**\r\n * Uploads all not uploaded items of queue\r\n */\r\n uploadAll() {\r\n var items = this.getNotUploadedItems().filter(item => !item.isUploading);\r\n if(!items.length) return;\r\n\r\n forEach(items, item => item._prepareToUploading());\r\n items[0].upload();\r\n }\r\n /**\r\n * Cancels all uploads\r\n */\r\n cancelAll() {\r\n var items = this.getNotUploadedItems();\r\n forEach(items, item => item.cancel());\r\n }\r\n /**\r\n * Returns \"true\" if value an instance of File\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n isFile(value) {\r\n return this.constructor.isFile(value);\r\n }\r\n /**\r\n * Returns \"true\" if value an instance of FileLikeObject\r\n * @param {*} value\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n isFileLikeObject(value) {\r\n return this.constructor.isFileLikeObject(value);\r\n }\r\n /**\r\n * Returns \"true\" if value is array like object\r\n * @param {*} value\r\n * @returns {Boolean}\r\n */\r\n isArrayLikeObject(value) {\r\n return this.constructor.isArrayLikeObject(value);\r\n }\r\n /**\r\n * Returns a index of item from the queue\r\n * @param {Item|Number} value\r\n * @returns {Number}\r\n */\r\n getIndexOfItem(value) {\r\n return isNumber(value) ? value : this.queue.indexOf(value);\r\n }\r\n /**\r\n * Returns not uploaded items\r\n * @returns {Array}\r\n */\r\n getNotUploadedItems() {\r\n return this.queue.filter(item => !item.isUploaded);\r\n }\r\n /**\r\n * Returns items ready for upload\r\n * @returns {Array}\r\n */\r\n getReadyItems() {\r\n return this.queue\r\n .filter(item => (item.isReady && !item.isUploading))\r\n .sort((item1, item2) => item1.index - item2.index);\r\n }\r\n /**\r\n * Destroys instance of FileUploader\r\n */\r\n destroy() {\r\n forEach(this._directives, (key) => {\r\n forEach(this._directives[key], (object) => {\r\n object.destroy();\r\n });\r\n });\r\n }\r\n /**\r\n * Callback\r\n * @param {Array} fileItems\r\n */\r\n onAfterAddingAll(fileItems) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n */\r\n onAfterAddingFile(fileItem) {\r\n }\r\n /**\r\n * Callback\r\n * @param {File|Object} item\r\n * @param {Object} filter\r\n * @param {Object} options\r\n */\r\n onWhenAddingFileFailed(item, filter, options) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n */\r\n onBeforeUploadItem(fileItem) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} fileItem\r\n * @param {Number} progress\r\n */\r\n onProgressItem(fileItem, progress) {\r\n }\r\n /**\r\n * Callback\r\n * @param {Number} progress\r\n */\r\n onProgressAll(progress) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onSuccessItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onErrorItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onCancelItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n * @param {*} response\r\n * @param {Number} status\r\n * @param {Object} headers\r\n */\r\n onCompleteItem(item, response, status, headers) {\r\n }\r\n /**\r\n * Callback\r\n * @param {FileItem} item\r\n */\r\n onTimeoutItem(item) {\r\n }\r\n /**\r\n * Callback\r\n */\r\n onCompleteAll() {\r\n }\r\n /**********************\r\n * PRIVATE\r\n **********************/\r\n /**\r\n * Returns the total progress\r\n * @param {Number} [value]\r\n * @returns {Number}\r\n * @private\r\n */\r\n _getTotalProgress(value) {\r\n if(this.removeAfterUpload) return value || 0;\r\n\r\n var notUploaded = this.getNotUploadedItems().length;\r\n var uploaded = notUploaded ? this.queue.length - notUploaded : this.queue.length;\r\n var ratio = 100 / this.queue.length;\r\n var current = (value || 0) * ratio / 100;\r\n\r\n return Math.round(uploaded * ratio + current);\r\n }\r\n /**\r\n * Returns array of filters\r\n * @param {Array|String} filters\r\n * @returns {Array}\r\n * @private\r\n */\r\n _getFilters(filters) {\r\n if(!filters) return this.filters;\r\n if(isArray(filters)) return filters;\r\n var names = filters.match(/[^\\s,]+/g);\r\n return this.filters\r\n .filter(filter => names.indexOf(filter.name) !== -1);\r\n }\r\n /**\r\n * @param {Array} filters\r\n * @returns {Array}\r\n * @private\r\n */\r\n _convertFiltersToPipes(filters) {\r\n return filters\r\n .map(filter => {\r\n let fn = bind(this, filter.fn);\r\n fn.isAsync = filter.fn.length === 3;\r\n fn.originalFilter = filter;\r\n return fn;\r\n });\r\n }\r\n /**\r\n * Updates html\r\n * @private\r\n */\r\n _render() {\r\n if(!$rootScope.$$phase) $rootScope.$apply();\r\n }\r\n /**\r\n * Returns \"true\" if item is a file (not folder)\r\n * @param {File|FileLikeObject} item\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _folderFilter(item) {\r\n return !!(item.size || item.type);\r\n }\r\n /**\r\n * Returns \"true\" if the limit has not been reached\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _queueLimitFilter() {\r\n return this.queue.length < this.queueLimit;\r\n }\r\n /**\r\n * Checks whether upload successful\r\n * @param {Number} status\r\n * @returns {Boolean}\r\n * @private\r\n */\r\n _isSuccessCode(status) {\r\n return (status >= 200 && status < 300) || status === 304;\r\n }\r\n /**\r\n * Transforms the server response\r\n * @param {*} response\r\n * @param {Object} headers\r\n * @returns {*}\r\n * @private\r\n */\r\n _transformResponse(response, headers) {\r\n var headersGetter = this._headersGetter(headers);\r\n forEach($http.defaults.transformResponse, (transformFn) => {\r\n response = transformFn(response, headersGetter);\r\n });\r\n return response;\r\n }\r\n /**\r\n * Parsed response headers\r\n * @param headers\r\n * @returns {Object}\r\n * @see https://github.com/angular/angular.js/blob/master/src/ng/http.js\r\n * @private\r\n */\r\n _parseHeaders(headers) {\r\n var parsed = {}, key, val, i;\r\n\r\n if(!headers) return parsed;\r\n\r\n forEach(headers.split('\\n'), (line) => {\r\n i = line.indexOf(':');\r\n key = line.slice(0, i).trim().toLowerCase();\r\n val = line.slice(i + 1).trim();\r\n\r\n if(key) {\r\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\r\n }\r\n });\r\n\r\n return parsed;\r\n }\r\n /**\r\n * Returns function that returns headers\r\n * @param {Object} parsedHeaders\r\n * @returns {Function}\r\n * @private\r\n */\r\n _headersGetter(parsedHeaders) {\r\n return (name) => {\r\n if(name) {\r\n return parsedHeaders[name.toLowerCase()] || null;\r\n }\r\n return parsedHeaders;\r\n };\r\n }\r\n /**\r\n * The XMLHttpRequest transport\r\n * @param {FileItem} item\r\n * @private\r\n */\r\n _xhrTransport(item) {\r\n var xhr = item._xhr = new XMLHttpRequest();\r\n var sendable;\r\n\r\n if (!item.disableMultipart) {\r\n sendable = new FormData();\r\n forEach(item.formData, (obj) => {\r\n forEach(obj, (value, key) => {\r\n sendable.append(key, value);\r\n });\r\n });\r\n\r\n sendable.append(item.alias, item._file, item.file.name);\r\n }\r\n else {\r\n sendable = item._file;\r\n }\r\n\r\n if(typeof(item._file.size) != 'number') {\r\n throw new TypeError('The file specified is no longer valid');\r\n }\r\n\r\n xhr.upload.onprogress = (event) => {\r\n var progress = Math.round(event.lengthComputable ? event.loaded * 100 / event.total : 0);\r\n this._onProgressItem(item, progress);\r\n };\r\n\r\n xhr.onload = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n var gist = this._isSuccessCode(xhr.status) ? 'Success' : 'Error';\r\n var method = '_on' + gist + 'Item';\r\n this[method](item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.onerror = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n this._onErrorItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.onabort = () => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = this._transformResponse(xhr.response, headers);\r\n this._onCancelItem(item, response, xhr.status, headers);\r\n this._onCompleteItem(item, response, xhr.status, headers);\r\n };\r\n\r\n xhr.timeout = item.timeout || 0;\r\n\r\n xhr.ontimeout = (e) => {\r\n var headers = this._parseHeaders(xhr.getAllResponseHeaders());\r\n var response = \"Request Timeout.\";\r\n this._onTimeoutItem(item);\r\n this._onCompleteItem(item, response, 408, headers);\r\n };\r\n\r\n xhr.open(item.method, item.url, true);\r\n\r\n xhr.withCredentials = item.withCredentials;\r\n\r\n forEach(item.headers, (value, name) => {\r\n xhr.setRequestHeader(name, value);\r\n });\r\n\r\n xhr.send(sendable);\r\n }\r\n /**\r\n * The IFrame transport\r\n * @param {FileItem} item\r\n * @private\r\n */\r\n _iframeTransport(item) {\r\n var form = element('
');\r\n var iframe = element('