Help Center> Object Storage Service> BrowserJS> FAQs> What Do I Do If the Resumable Upload API Reports a "400 InvalidPart" Error?
Updated on 2024-02-22 GMT+08:00

What Do I Do If the Resumable Upload API Reports a "400 InvalidPart" Error?

The error was possibly caused by:

  1. a certain part requested not existing.
  2. an incorrect ETag of a certain part.

Perform the following steps to locate the reason:

  1. Open the developer tool of the browser.
  2. Check whether the request body of the API for assembling parts complies with the API specifications.

    • If all ETag values in the request body are undefined, this indicates the ETag field has not been configured as an extended header of CORS. In this case, the error was caused by reason 2. Refer to Configuring CORS for a Bucket to add the ETag field.

  3. If the request body complies with the API specifications, proceed to:

    • Check whether the list of parts requested contains any parts that do not exist. Assume an object was divided into three parts: a, b, and c, but the list contains an additional part d. In this case, the error was caused by reason 1. To solve the problem, delete all parts that do not exist.
    • Check whether all ETag values in the request body are the same as those returned by the server. If any values are different, the error was caused by reason 2. To solve the problem, correct all incorrect ETag values.