JSFiddle - React, Tailwind, and code Playground
by ozzon91
JavaScript
uploader[msg_id].removeQueuedFile = function(file)
{
var id = typeof(file) === 'string' ? file : file.id;
for (var i = this.files.length - 1; i >= 0; i--)
{
if (this.files[i].id === id)
{
var removed = this.files.splice(i, 1);
var restartRequired = false;
if (removed[0].status == plupload.UPLOADING && this.state == plupload.STARTED)
{
restartRequired = true;
this.stop();
}
this.trigger("FilesRemoved", removed);
removed[0].destroy();
this.trigger("QueueChanged");
this.refresh();
if (restartRequired)
{
this.start();
}
window.isProgress = false;
return removed[0];
}
}
};