Technologies | Quick Start | Deployment | How to contribute
This project was developed with the following technologies:
- Upload media to S3
- Get media from S3
-
run:
$ yarn
for install dependencies
-
If you already have an account, you can use your {Access key ID} and {Secret access key}
-
Create an account in AWS
1: Log in your account
2: Click in `Services` search by `IAM`
3: In `Access management` click in `Users`
3.1: Click in `Add user`
3.2: Select the Access type `Programmatic access`
3.3: Click in `Next: Permissions` button
4: Click in `Attach existing policies directly`
4.1: Select `AdministratorAccess`
4:2: Click in `Next Tags` button
5: In Add tags (optional) Click in `Next: Review` button
6: In `Review` Click in `Create User` button
7: Copy `Access key ID` and `Secret access key` keep it with you
8: Click in `close` button
-
run:
$ yarn add serverless -g
-
run:
serverless config credentials --provider aws --key {Access key ID} --secret {Secret access key}
- and run:
$ yarn run dev
to serverless offline
- run:
$ yarn run deploy
for deploy in AWS
- run:
$ yarn run rm
for serverless remove
- To
upload file
make aPOST
request to{APP_URL}/{APP_STAGE}/upload
with body:
{
"data": "{base64}",
"path": "{path}",
"type": "{type}",
"id": "{id}",
"filename": "{filename}",
"mime_type": "{mime_type}"
}
- The response from
upload
is:
{
"url": "{APP_URL}/{APP_STAGE}/file/{path}/{type}/{id}/{hash file}
}
-
To
get file
make aGET
request to{APP_URL}/{APP_STAGE}/file/{path}/{type}/{id}/{hash file}
-
The response from
GET
is arendered file
- Fork this repository
- Create a branch with your feature:
git checkout -b my-feature
- Commit your changes:
git commit -m 'my new feature'
- Push to your branch:
git push origin my-feature
- Open a pull request
After the merge of your pull request is done, you can delete your branch.
- Richard Pinheiro - GitHub