Upload file to s3: make public a file on upload and allow to configure destination folder

New configurations:
- s3folder: (string) folder to save the files inside bucket
- s3publicFiles: (boolean) indicate if should send ACL parameters

Signed-off-by: Lautaro Alvarez <lautarolalvarez@gmail.com>
This commit is contained in:
Lautaro Alvarez 2022-05-25 16:49:32 -03:00 committed by David Mehren
parent 8643d9cc99
commit 3585dc9ee6
4 changed files with 18 additions and 11 deletions

View file

@ -251,14 +251,16 @@ you don't have to use either of these.
### Amazon S3
| config file | environment | **default** and example value | description |
| ----------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/s3-image-upload.md) |
| | `CMD_S3_ACCESS_KEY_ID` | **no default** | AWS access key id |
| | `CMD_S3_SECRET_ACCESS_KEY` | **no default** | AWS secret key |
| | `CMD_S3_REGION` | **no default**, `ap-northeast-1` | AWS S3 region |
| `s3bucket` | `CMD_S3_BUCKET` | **no default** | AWS S3 bucket name |
| | `CMD_S3_ENDPOINT ENV` | **no default** | S3 API endpoint if you don't use AWS name |
| config file | environment | **default** and example value | description |
| --------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `s3` | | `{ "accessKeyId": "YOUR_S3_ACCESS_KEY_ID", "secretAccessKey": "YOUR_S3_ACCESS_KEY", "region": "YOUR_S3_REGION" }` | When `imageuploadtype` be set to `s3`, you would also need to setup this key, check our [S3 Image Upload Guide](guides/s3-image-upload.md) |
| | `CMD_S3_ACCESS_KEY_ID` | **no default** | AWS access key id |
| | `CMD_S3_SECRET_ACCESS_KEY` | **no default** | AWS secret key |
| | `CMD_S3_REGION` | **no default**, `ap-northeast-1` | AWS S3 region |
| `s3bucket` | `CMD_S3_BUCKET` | **no default** | AWS S3 bucket name |
| | `CMD_S3_ENDPOINT ENV` | **no default** | S3 API endpoint if you don't use AWS name |
| `s3folder` | `CMD_S3_FOLDER` | 'uploads' | Folder where the files will be saved inside the bucket |
| `s3publicFiles` | `CMD_S3_PUBLIC_FILES` | `false` | If se to `true` set public permissions to files when uploading to s3 storage |
### Azure Blob Storage