Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeremeamia/azphp-s3-upload-demo
Demo code for presentation about uploading to S3 from PHP at azPHP
https://github.com/jeremeamia/azphp-s3-upload-demo
demo examples php policy post-object s3 upload
Last synced: 23 days ago
JSON representation
Demo code for presentation about uploading to S3 from PHP at azPHP
- Host: GitHub
- URL: https://github.com/jeremeamia/azphp-s3-upload-demo
- Owner: jeremeamia
- Created: 2018-07-24T20:53:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-07-28T00:11:38.000Z (over 6 years ago)
- Last Synced: 2024-11-30T05:40:59.054Z (3 months ago)
- Topics: demo, examples, php, policy, post-object, s3, upload
- Language: PHP
- Homepage: https://speakerdeck.com/jeremeamia/uploading-to-s3-from-php
- Size: 73.2 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# azPHP S3 Upload Demo
This is a demo PHP project to show how to upload files to [Amazon S3][s3] via PHP.
## Installation
1. Make sure you have php7 and [composer][] installed.
2. Make sure you have [`docker`][dkr], [`docker-compose`][dkrc], and [`ngrok`][ngrok] installed.
3. Checkout the repo, `cd` to it, and run `composer install`.
4. Copy `env.dist` to `.env` (`cp env.dist .env`) and put your AWS credentials, region, and bucket in it.
- It is recommended to use the credentials of an IAM user that just has S3 priviliges.
5. Run `ngrok http 9999`. Copy the ngrok URL for the app into `APP_HOST` in `.env`.
6. Run `docker-compose up`.
7. Go to http://localhost:9999 in browser, or the ngrok URL.[composer]: https://getcomposer.org/
[s3]: https://aws.amazon.com/s3/
[dkr]: https://docs.docker.com/
[dkrc]: https://docs.docker.com/compose/
[ngrok]: https://ngrok.com/