Direct-to-S3 / Azure tus 1.0 resume IndexedDB Golden Retriever 30 locales Webcam & screen capture

Cancel Queue

Cancel individual files or the entire queue. Cancelled files are removed and in-progress uploads are aborted immediately.

What you should see: auto-upload is off, so files wait in the queue. Start the upload and cancel mid-flight — in-progress transfers abort and the queue is cleared rather than left half-finished.
Select files to begin.
var uploader = CoreUpload.create('#cancel-uploader', {
 uploadUrl: '/api/upload/upload',
 multiple: true,
 autoUpload: false,
 concurrent: 2,
 onTaskProgress: function(file, percent) {
 console.log(file.name + ': ' + percent + '%');
 },
 onCancel: function(file) {
 console.log('Cancelled:', file.name);
 },
 onTaskComplete: function(file) {
 console.log('Uploaded:', file.name);
 }
});

// Upload all queued files
document.getElementById('btn-cancel-upload').onclick = function() {
 uploader.upload();
};

// Cancel all uploads
document.getElementById('btn-cancel-all').onclick = function() {
 uploader.cancel();
};

Stopping what is in flight

Cancelling aborts the request. It does not by itself remove whatever the server already wrote, which is the part that needs thinking about if uploads are stored as they complete.

Make cancel mean what the user thinks it means

A cancel that leaves half a file on the server is not the cancel they believe they got. Either upload to a staging location that a later step promotes, or give the cancel path a cleanup call. Chunked uploads make this easier: an incomplete chunk set was never assembled into a file.