- Remove outdated examples - Rename folders for consistency - Remove lots of unused deps in angular example. - Rename `name` inside `package.json`'s from `@uppy-example/*` to `example-*`. **Before** ``` ├── angular-example ├── aws-companion ├── aws-nodejs ├── aws-php ├── bundled ├── cdn-example ├── custom-provider ├── digitalocean-spaces ├── multiple-instances ├── node-xhr ├── php-xhr ├── python-xhr ├── react ├── react-native-expo ├── redux ├── sveltekit ├── transloadit ├── transloadit-markdown-bin ├── uppy-with-companion ├── vue3 └── xhr-bundle ``` **After** ``` examples ├── angular ├── aws-companion ├── aws-nodejs ├── aws-php ├── cdn ├── companion ├── companion-custom-provider ├── companion-digitalocean-spaces ├── react ├── react-native-expo ├── redux ├── sveltekit ├── transloadit ├── vue ├── xhr-bundle ├── xhr-node ├── xhr-php └── xhr-python ``` |
||
|---|---|---|
| .. | ||
| .gitignore | ||
| composer.json | ||
| composer.lock | ||
| index.html | ||
| main.js | ||
| package.json | ||
| readme.md | ||
| s3-sign.php | ||
| serve.php | ||
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