uppy/examples/aws-presigned-url
Renée Kooi 7b2283d8ef
examples: add npm run example script
a bad result from adding the examples as dependencies of the root
repository is that they now don't have access to the npm binaries they
need to run in their own folder, because they are installed into the
root repository instead.

this works around that issue.

we may need to consider undoing that change and making the examples work
as standalone projects again, that's easier to understand.

fixes #2024 for now.
2020-01-15 11:16:56 +01: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 Fix some example names. 2018-04-09 14:28:23 +02:00
main.js website,examples: set a content-type header for S3 presigned PUT uploads 2019-09-23 15:22:44 +02:00
package.json lerna link convert (#1730) 2019-07-19 12:16:36 +02:00
readme.md examples: add npm run example script 2020-01-15 11:16:56 +01:00
s3-sign.php website,examples: set a content-type header for S3 presigned PUT uploads 2019-09-23 15:22:44 +02:00
serve.js Tweaks to aws-presigned-url example so it doesn't hide build errors 2018-11-12 11:23:44 +01: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:

npm install

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.

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, again in the repository root, start this example by doing:

npm run example aws-presigned-url

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

Optionally, provide a port in the PORT environment variable:

PORT=8080 npm run example aws-presigned-url