Uppy AWS S3 Plugin

Learn how to configure the Uppy AWS S3 Plugin for use with Filebase.

What is Uppy?

Uppy is a module file uploader that fetches files from a local or external location and uploads them to a destination endpoint such as AWS S3. Uppy features a comprehensible API and a variety of modules and plugins for file manipulation and management. Uppy currently does not support Windows NPM environments. The Uppy API works closely with Transloaditarrow-up-right.

Read below to learn how to use Uppy AWS S3 Plugin with Filebase.

circle-check

Prerequisites:

1. Install the Uppy AWS S3 plugin and the Uppy Companion plugin:

npm install @uppy/aws-s3

npm install @uppy/companion

2. If using a stand-alone Uppy server, set the following environment variables:

export COMPANION_AWS_KEY="FILEBASE_ACCESS_KEY"
export COMPANION_AWS_SECRET="FILEBASE_SECRET_KEY"

# Alternative to set secret via file instead of environment variable:
export COMPANION_AWS_SECRET_FILE="PATH/TO/FILEBASE/SECRET/FILE"

export COMPANION_AWS_ENDPOINT="s3.filebase.com"
export COMPANION_AWS_BUCKET="FILEBASE_BUCKET_NAME"
export COMPANION_AWS_REGION="US_EAST_1"

Replace the following values to match your configuration:

  • FILEBASE_ACCESS_KEY: Filebase Access Key

  • FILEBASE_SECRET_KEY: Filebase Secret Key

  • PATH/TO/FILEBASE/SECRET/FILE: Path to Filebase credentials file if using a credentials file to store credentials instead of environment variables.

  • FILEBASE_BUCKET_NAME: Filebase Bucket Name

3. To use Uppy Companion with an existing server, call the server’s .app method and pass an options object as a parameter with the following code:

Replace the following values to match your configuration:

  • FILEBASE-ACCESS-KEY: Filebase Access Key

  • FILEBASE-SECRET-KEY: Filebase Secret Key

  • FILEBASE_BUCKET_NAME: Filebase Bucket Name

Last updated