This is a demo PHP project to show how to upload files to Amazon S3 via PHP.
- Make sure you have php7 and composer installed.
- Make sure you have
docker,docker-compose, andngrokinstalled. - Checkout the repo,
cdto it, and runcomposer install. - Copy
env.distto.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.
- Run
ngrok http 9999. Copy the ngrok URL for the app intoAPP_HOSTin.env. - Run
docker-compose up. - Go to http://localhost:9999 in browser, or the ngrok URL.