uploads

Create multipart upload

Creates a new multipart upload session. This allows you to upload the data for a new mod file version.

💡 Files smaller than 100 MiB can use the simpler single part upload.

Next steps

Multipart upload uses the Amazon S3 multipart upload specification.

  • Call PUT with your file data to each part_presigned_urls.
    • Each part must be part_size_bytes bytes, apart from the final part which may be smaller.
    • Retrieve the ETag response header value from each part upload.
  • Once all parts are uploaded, call POST to the complete presigned_url with XML post data describing the ETag for each part.
  • Once multipart complete is called, finalise the upload.

Multipart resources

Sample XML for completing the multipart upload:

<CompleteMultipartUpload>                                                                                                                                                                                                          
  <Part>                                                                                                                                                                                                                                                                           
    <PartNumber>1</PartNumber>                                                                                                                                                                                                                                                     
    <ETag>a54357aff0632cce46d942af68356b38</ETag>                                                                                                                                                                                                                                
  </Part>                                                                                                                                                                                                                                                                          
  <Part>                                                                                                                                                                                                                                                                           
    <PartNumber>2</PartNumber>                                                                                                                                                                                                                                                     
    <ETag>0c78aef83f66abc1fa1e8477f296d394</ETag>                                                                                                                                                                                                                                
  </Part>                                                                                                                                                                                                                                                                          
  <Part>                                                                                                                                                                                                                                                                           
    <PartNumber>3</PartNumber>                                                                                                                                                                                                                                                     
    <ETag>acbd18db4cc2f85cedef654fccc4a4d8</ETag>                                                                                                                                                                                                                                
  </Part>                                                                                                                                                                                                                                                                          
</CompleteMultipartUpload>

Content integrity (crc64nvme)

Supplying crc64nvme binds the complete_presigned_url to one file: storage computes the CRC-64/NVME of the assembled object on completion and rejects it on mismatch, so the whole file is verified end-to-end, not just each part. Send the same value in an x-amz-checksum-crc64nvme header on your POST to complete_presigned_url. It is optional today; omit it to complete exactly as before.

post/uploads/multipart

Request

  • Base URL: https://api.nexusmods.com/v3
  • URL: https://api.nexusmods.com/v3/uploads/multipart
  • Auth: one of:
    • API key in header apikey
    • HTTP bearer

Request body

size_bytesinteger required

Size of the archive being uploaded, in bytes.

filenamestring required

Filename for the archive being uploaded. This is the name sent in the Content-Disposition header when you upload the data, not the name of the mod file version created from it.

crc64nvmestring nullable

Optional. A CRC-64/NVME checksum of the complete file, base64-encoded — the value for the x-amz-checksum-crc64nvme header. null is treated the same as omitting the field.

When supplied it binds the complete_presigned_url to this one object: storage computes the CRC-64/NVME across the assembled parts on completion and rejects the upload if it does not match, giving end-to-end integrity for the whole file. Your POST to complete_presigned_url must send the same value in an x-amz-checksum-crc64nvme header.

CRC-64/NVME is the only algorithm storage validates against a whole multipart object; MD5 is not available here because the multipart ETag is a hash of the part digests, not of the file.

Response

Upload ID and presigned URL

Changes

No recorded changes to this operation across all 1 revision of this API.