What do I do if OSS returns the "NoSuchUpload" error code when I upload an object by using multipart upload?

更新时间:
复制 MD 格式

OSS returns NoSuchUpload when it cannot locate the upload ID for a multipart upload or resumable upload request:

The specified upload does not exist. The upload ID may be invalid, or the upload may have been aborted or completed.

The most common cause: the upload ID passed to UploadPart no longer exists. This happens when the upload ID was not saved after InitiateMultipartUpload returned it, or when the upload was aborted or already completed before UploadPart was called.

Solutions

Check the following in order:

  1. Confirm the upload ID was saved. InitiateMultipartUpload returns a globally unique upload ID. Every subsequent UploadPart call requires this ID. If your code does not persist the upload ID immediately after InitiateMultipartUpload returns, the upload cannot proceed. Save the upload ID to durable storage before calling UploadPart.

  2. Verify the upload is still active. An upload ID becomes invalid if the multipart upload was aborted or completed by another process. Confirm that no other process aborted or completed the same upload.

  3. Check that CompleteMultipartUpload returned HTTP 200 and a request ID. If CompleteMultipartUpload did not return HTTP 200, the upload was not completed — do not reuse that upload ID. Start a new multipart upload with InitiateMultipartUpload.

For the InitiateMultipartUpload API reference, see InitiateMultipartUpload.

How multipart upload works

A multipart upload consists of three steps:

  1. Initialize the upload — Call ossClient.initiateMultipartUpload. OSS returns a globally unique upload ID. Save this upload ID immediately; all subsequent operations for this upload require it.

  2. Upload parts — Call ossClient.uploadPart with the upload ID for each part.

  3. Complete the upload — After all parts are uploaded, call ossClient.completeMultipartUpload with the upload ID to combine all parts into a single object.

Applicable scope

  • Object Storage Service (OSS)