Skip to content

Commit

Permalink
Merge pull request #5 from mediamonks/feature/return-uploaded-keys
Browse files Browse the repository at this point in the history
Feature/return uploaded keys
  • Loading branch information
ThaNarie authored Jun 9, 2019
2 parents 2c59559 + 29857f2 commit 352c180
Show file tree
Hide file tree
Showing 10 changed files with 324 additions and 67 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib/**/*
src/lib/vendor/**/*
*.ts
wallaby.js
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/setting-creden
```js
import Uploader from 's3-batch-upload';

await new Uploader({
const files = await new Uploader({
config: './config/configS3.json', // can also use environment variables
bucket: 'bucket-name',
localPath: './files',
Expand All @@ -80,6 +80,9 @@ await new Uploader({
},
accessControlLevel: 'bucket-owner-full-control' // optional, not passed if undefined. - available options - "private"|"public-read"|"public-read-write"|"authenticated-read"|"aws-exec-read"|"bucket-owner-read"|"bucket-owner-full-control"
}).upload();

// the files array contains a list of uploaded keys, which you can use to build up the S3 urls.
// e.g. "remote/path/in/bucket/demo.jpg"
```

### S3 Authentication
Expand Down
2 changes: 1 addition & 1 deletion docs/assets/js/search.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 352c180

Please sign in to comment.