Additionally, any file
attributes can be passed along with the parts to
further add information to the file. See the
API for more details.Commit planned parts
If you , theparts list must include both:
- The parts you uploaded, using the responses from each
- The
hitsfrom the plan response, using thepart_id,offset, andsizeof each hit
0 to the end of
the file, with no gaps. Box also checks that each planned part matches the
size and SHA-512 hash sent in the plan request.
Part hashes
Each entry inparts can include a sha1 or a sha512 hash. Include
sha512 on every entry or on none of them. If only some entries include
sha512, the API returns a 400 Bad Request error with the code
invalid_parts_field.
If you used
to skip parts the server already has, list each of those parts in parts like
any other part. Use the part_id, offset, and size from the hits in the
plan response. Then:
- If the other entries include
sha512, include thesha512value from the plan response. - If the other entries include
sha1or no hash, leave the hash out of these entries.
The
digest header for the whole file supports SHA-1 only, even if you
uploaded the parts with SHA-512 digests.Response
When successful, the API returns an HTTP201 Created status code with a
object.
In some cases, creating the parts might not be ready yet and the API returns
a 202 Accepted status code instead. In this case, the application checks
the retry-after header and retry committing after the number of seconds
specified.
