tiny-s3-uploader
A tiny S3 uploader which doesn't need the fat aws-sdk.
Last updated 5 months ago by jakemakesstuff .
MPL-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install tiny-s3-uploader 
SYNC missed versions from official npm registry.

tiny-s3-uploader

A tiny S3 uploader which doesn't need the fat aws-sdk.

const { S3 } = require("tiny-s3-uploader")
const client = new S3(
    "s3.eu-west-2.amazonaws.com", // The AWS endpoint.
    "ACCESS_KEY_ID_HERE", // The AWS access key ID.
    "SECRET_ACCESS_KEY_HERE", // The AWS secret access key.
    "bucket.example.com", // The AWS bucket.
)

// In a async function...
await client.upload(
    "test.txt", // The key to the file.
    "public-read", // The ACL to the file.
    "binary/octet-stream", // The content type of the file.
    Buffer.from("Hello World!"), // The Buffer to send.
)

Current Tags

  • 1.0.0                                ...           latest (5 months ago)

1 Versions

  • 1.0.0                                ...           5 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 1
Dependencies (3)
Dev Dependencies (5)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |