Class: S3Service

S3Service() → {S3Service}

Convenience wrapper around AWS S3 service (not meant to be instantiated directly).

Constructor

new S3Service() → {S3Service}

Returns:

a S3Service instance.

Type
S3Service

Methods

put(bucket, key, acl, contentType) → {Promise}

Put an object to S3 via Stitch. For small uploads

NOTE: body must be a pipeline stream

Parameters:
Name Type Description
bucket String

which S3 bucket to use

key String

which key (filename) to use

acl String

which policy to apply

contentType String

content type of uploaded data

Returns:
Type
Promise

signPolicy(bucket, key, acl, contentType) → {Promise}

Sign a policy for putting via Stitch. For large uploads

Parameters:
Name Type Description
bucket String

which S3 bucket to use

key String

which key (filename) to use

acl String

which policy to apply

contentType String

content type of uploaded data

Returns:
Type
Promise