SP.File.finishUpload Method (sp.js)
Uploads the last file fragment and commits the file. The current file content is changed when this method completes.
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.finishUpload()
Parameters
uploadId
Type: NumberThe unique identifier of the upload session. Use the uploadId value that was passed to the SP.File.startUpload Method (sp.js) method that started the upload session.
fileOffset
Type: NumberThe size of the offset into the file where the fragment starts.
stream
Type: StreamThe stream that contains the first fragment to upload.
Return value
Type: Number
The size of the uploaded data in bytes.