uppy/examples/aws-php
Prakash 1bb94b8759 fix(examples): align aws-s3 examples with rewritten plugin API
- aws-nodejs: STS mode now passes s3Endpoint (required when using
  getCredentials in the new plugin; previously threw "s3Endpoint must
  be a string" at install time).
- companion-digitalocean-spaces: rename companionUrl → companionEndpoint
  (option renamed in the rewrite). Update README links from
  /docs/aws-s3-multipart to /docs/aws-s3.
- aws-php: migrate from removed getUploadParameters to signRequest.
  Backend (s3-sign.php) returns just { url } now; client no longer
  receives method/fields/headers.
2026-05-25 19:23:19 +05:30
..
.gitignore Add example for Uppy with S3 and a Node.js server (#4129) 2022-10-17 16:43:00 -03:00
composer.json meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
composer.lock build(deps): bump aws/aws-sdk-php from 3.288.1 to 3.368.0 in /examples/aws-php (#6112) 2025-12-22 09:24:41 +01:00
index.html meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
main.js fix(examples): align aws-s3 examples with rewritten plugin API 2026-05-25 19:23:19 +05:30
package.json Cleanup examples (#5817) 2025-07-10 17:23:58 +02:00
readme.md meta: enable prettier for markdown (#5133) 2024-05-02 11:35:55 +02:00
s3-sign.php fix(examples): align aws-s3 examples with rewritten plugin API 2026-05-25 19:23:19 +05:30
serve.php Add example for Uppy with S3 and a Node.js server (#4129) 2022-10-17 16:43:00 -03:00

Uppy + AWS S3 Example

This example uses a server-side PHP endpoint to sign uploads to S3.

Running It

To run this example, make sure you've correctly installed the repository root:

yarn || corepack yarn install
yarn build || corepack yarn build

That will also install the npm dependencies for this example.

This example also uses the AWS PHP SDK. To install it, get composer and run composer update in this folder.

corepack yarn workspace @uppy-example/aws-php exec "composer update"

Configure AWS S3 credentials using environment variables or a credentials file in ~/.aws/credentials. Configure a bucket name and region in the s3-sign.php file.

Then, again in the repository root, start this example by doing:

corepack yarn workspace @uppy-example/aws-php start

The demo should now be available at http://localhost:8080.

You can use a different S3-compatible service like GCS by configuring that service in ~/.aws/config and ~/.aws/credentials, and then providing appropriate environment variables:

AWS_PROFILE="gcs" \
COMPANION_AWS_ENDPOINT="https://storage.googleapis.com" \
COMPANION_AWS_BUCKET="test-bucket-name" \
  corepack yarn run example aws-php