Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Companion: document new arguments for s3.bucket and s3.getKey #183

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions docs/companion.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,13 @@ from the AWS SDK.

The name of the bucket to store uploaded files in.

It can be function that takes a [`http.IncomingMessage`][] object as argument
and returns the name of the bucket as a `string`.
It can be function that returns the name of the bucket as a `string` and takes
the following arguments:

- [`http.IncomingMessage`][], the HTTP request (will be `null` for remote
uploads)
- metadata provided by the user for the file (will be `undefined` for local
uploads)

##### `s3.region` `COMPANION_AWS_REGION`

Expand Down Expand Up @@ -508,9 +513,10 @@ Get the key name for a file. The key is the file path to which the file will be
uploaded in your bucket. This option should be a function receiving three
arguments:

- `req`, the HTTP request, for _regular_ S3 uploads using the `@uppy/aws-s3`
plugin. This parameter is _not_ available for multipart uploads using the
`@uppy/aws-s3` or `@uppy/aws-s3-multipart` plugins;
- `req` [`http.IncomingMessage`][], the HTTP request, for _regular_ S3 uploads
using the `@uppy/aws-s3` plugin. This parameter is _not_ available for
multipart uploads using the `@uppy/aws-s3` or `@uppy/aws-s3-multipart`
plugins. This parameter is `null` for remote uploads.
- `filename`, the original name of the uploaded file;
- `metadata`, user-provided metadata for the file.

Expand Down