|
5 years ago | |
---|---|---|
.. | ||
.gitignore | 7 years ago | |
composer.json | 7 years ago | |
composer.lock | 7 years ago | |
index.html | 7 years ago | |
main.js | 5 years ago | |
package.json | 5 years ago | |
readme.md | 5 years ago | |
s3-sign.php | 5 years ago | |
serve.js | 6 years ago |
This example uses a server-side PHP endpoint to sign uploads to S3.
To run this example, make sure you've correctly installed the root repository:
npm install
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 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