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
, andngrok
installed. - Checkout the repo,
cd
to it, and runcomposer install
. - 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.
- Run
ngrok http 9999
. Copy the ngrok URL for the app intoAPP_HOST
in.env
. - Run
docker-compose up
. - Go to http://localhost:9999 in browser, or the ngrok URL.