Skip to content

s3.putBufferPart()

SaltwaterC edited this page Jan 30, 2012 · 1 revision

About

S3 Multipart Upload API helper for uploading a part of a multipart upload that originates from a node.js Buffer

Reference

s3.putBufferPart(path, partNumber, uploadId, buffer, callback)
  • 'path' - the S3 Path.
  • 'partNumber' - the part number, from 1 to 10,000 inclusive. This is an unique identifier for each upload part.
  • 'uploadId' - the uploadId from s3.initUpload().
  • 'buffer' - the Buffer to be uploaded as part.
  • 'callback' - the callback that is executed when the processing finishes. It has a couple of arguments: error and result.
  • If there's an error, the callback receives the error argument as Error instance.
  • If the error argument is null, then the response argument contains an object with the following keys: partNumber and ETag. You need this pair for assembling the uploadParts object for s3.completeUpload().

Each part must be at least 5 MiB (5242880 bytes) in size, except the last part. If you fail to obey this rule, s3.completeUpload() fails with a specific error.

Clone this wiki locally