SP.File.cancelUpload Method (sp.js)

Stops the chunk upload session without saving the uploaded data. If the file doesn’t already exist in the library, the partially uploaded file will be deleted. Use this in response to user action (as in a request to cancel an upload) or an error or exception.

Applies to: apps for SharePoint | SharePoint Foundation 2013 | SharePoint Server 2013

Use the uploadId value that was passed to the SP.File.startUpload Method (sp.js) method that started the upload session.

This method is currently available only on Office 365.

SP.File.cancelUpload()

Parameters

  • uploadId
    Type: Number

    The unique identifier of the upload session.