Skip to content

Commit e243a6f

Browse files
committed
update README to support binary type in s3
1 parent d354ee4 commit e243a6f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ This Serverless Framework plugin supports the AWS service proxy integration feat
2323
- [Customize the Path Override in API Gateway](#customize-the-path-override-in-api-gateway)
2424
- [Can use greedy, for deeper Folders](#can-use-greedy--for-deeper-folders)
2525
- [Customizing responses](#customizing-responses-1)
26+
- [Allow Bindary Types](#allow-binary-type)
2627
- [SNS](#sns)
2728
- [Customizing responses](#customizing-responses-2)
2829
- [DynamoDB](#dynamodb)
@@ -403,7 +404,18 @@ custom:
403404
serverError: |-
404405
{ "message": "there was an error handling your request" }
405406
```
407+
#### Allow Binary Type
406408
409+
In order to allow the browser to recognize binary type (e.g. images), add the following.
410+
411+
This would impact Rest API [settings](https://github.com/serverless/serverless/blob/main/lib/plugins/aws/package/compile/events/api-gateway/lib/rest-api.js#8,21) which is [called](https://github.com/serverless-operations/serverless-apigateway-service-proxy/blob/9f41894cd2e458263d3128116aa6af19ec2b333b/lib/index.js#7,81) by our plugin
412+
413+
```yml
414+
#provider.apiGateway.binaryMediaTypes
415+
provider:
416+
apiGateway:
417+
binaryMediaTypes: "*/*"
418+
```
407419
### SNS
408420
409421
Sample syntax for SNS proxy in `serverless.yml`.

0 commit comments

Comments
 (0)