Antoine du Hamel 0697f75b7c meta: update more dependencies (#5171) vor 11 Monaten
..
.gitignore 3f07d79de6 Add example for Uppy with S3 and a Node.js server (#4129) vor 2 Jahren
composer.json 34c78e9093 meta: run Prettier on existing files (#4713) vor 1 Jahr
composer.lock f781d4e41a build(deps): bump aws/aws-sdk-php from 3.272.1 to 3.288.1 in /examples/aws-php (#4838) vor 1 Jahr
index.html 34c78e9093 meta: run Prettier on existing files (#4713) vor 1 Jahr
main.js 2b26e646d3 example/aws-php: make it forward-compatible with the next Uppy major (#4522) vor 1 Jahr
package.json 0697f75b7c meta: update more dependencies (#5171) vor 11 Monaten
readme.md 7d6937300a meta: enable prettier for markdown (#5133) vor 11 Monaten
s3-sign.php 3f07d79de6 Add example for Uppy with S3 and a Node.js server (#4129) vor 2 Jahren
serve.php 3f07d79de6 Add example for Uppy with S3 and a Node.js server (#4129) vor 2 Jahren

readme.md

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