uppy/examples/aws-presigned-url
2017-08-15 13:01:55 +02:00
..
.gitignore examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
composer.json examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
composer.lock examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
index.html examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
main.js examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
package-lock.json examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
package.json examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
readme.md examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00
s3-sign.php docs/examples: Fix CORS policy in S3 docs and fix reading body in PHP example. 2017-08-15 13:01:55 +02:00
serve.js examples: Add the AWS S3 server-side presigned URL example. 2017-08-15 12:51:34 +02:00

Uppy + AWS S3 Example

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

Running It

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

cd ./examples/aws-presigned-url
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 install npm dependencies using

npm install

and start the demo server using

npm start

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

Optionally, provide a port in the PORT environment variable:

PORT=8080 npm start