MCPcopy
hub / github.com/nervgh/angular-file-upload / removeFromQueue

Method removeFromQueue

src/services/FileUploader.js:108–115  ·  view source on GitHub ↗

* Remove items from the queue. Remove last: index = -1 * @param {FileItem|Number} value

(value)

Source from the content-addressed store, hash-verified

106 * @param {FileItem|Number} value
107 */
108 removeFromQueue(value) {
109 var index = this.getIndexOfItem(value);
110 var item = this.queue[index];
111 if(item.isUploading) item.cancel();
112 this.queue.splice(index, 1);
113 item._destroy();
114 this.progress = this._getTotalProgress();
115 }
116 /**
117 * Clears the queue
118 */

Callers 1

removeMethod · 0.80

Calls 4

getIndexOfItemMethod · 0.95
_getTotalProgressMethod · 0.95
cancelMethod · 0.80
_destroyMethod · 0.80

Tested by

no test coverage detected