Comments (7)
Would using the binaryMimeTypes option also work instead of introducing a new option?
What if you have other routes not needing binary?
from aws-lambda-fastify.
btw: have you defined multipart/form-data as a binary media type for your API, like described here?
If so can you share how your lambda event looks like?
from aws-lambda-fastify.
umm.. i tested with serverless-offline plugin and serveless config(serverless.ts) looks like
provider: {
name: 'aws',
runtime: 'nodejs14.x',
lambdaHashingVersion: 20201221,
stage: 'dev',
region: 'ap-northeast-2',
logRetentionInDays: 14,
memorySize: 256,
apiGateway: {
binaryMediaTypes: ['multipart/form-data', 'image/*'],
apiKeySourceType: 'HEADER',
minimumCompressionSize: 5000,
},
...
}
and this is lambda event
'create-template': {
handler: 'src/functions/create-template/handler.main',
events: [
{
http: {
path: 'upload/templates',
method: 'post',
cors: corsPolicy,
private: true,
},
},
],
},
Would using the binaryMimeTypes option also work instead of introducing a new option? What if you have other routes not needing binary?
i already tried to solve this problem with binaryMimeType. but i can't still find reason why not working with binaryMimeType...
from aws-lambda-fastify.
and this is lambda event
I mean the real aws lambda event that is passed in your lambda handle function...
something like:
exports.handler = async (event, context) => {
console.log(JSON.stringify(event, null, 2))
return proxy(event, context)
}
from aws-lambda-fastify.
fyi: I just added some multipart tests.... seems to work: e274f7e
from aws-lambda-fastify.
oh,, i'm sry for confusion. atfter i have tried many times, figured out it happens due to local environment. it works on real aws api gw and lambda environment. thanks for reply!
from aws-lambda-fastify.
close PR too
from aws-lambda-fastify.
Related Issues (20)
- Setting cookie to reply causes API Gateway v1 to return 500 HOT 9
- Use with NestJS HOT 20
- Support compressed responses HOT 3
- Release 3.1.0 doesn't match this repo HOT 2
- Is there any reason the package is not written with TS? HOT 2
- Support for MultiStringQueryParameter in ApiGateway V2 HOT 4
- Unable to get fastify/swagger working with fastify/aws-lambda HOT 3
- TypeScript and ESM: This expression is not callable. Type ... has no call signatures HOT 6
- Support for response streaming HOT 5
- Do you suggest this wrapper over serverless-http? HOT 6
- url encode/decode problem HOT 4
- Maintainer access to the Plugins Team HOT 3
- Use event.pathParameters.proxy instead of event.path HOT 8
- Updating for v5
- Remote IP address passed to app.inject() HOT 5
- Provide the package as an ESModule HOT 1
- Running Fastify on AWS Lambda: Dynamic require of "events" is not supported HOT 1
- Incorrect splitting of query parameters parameters containing literal commas HOT 5
- App FastifyInstance type error when using ZodTypeProvider HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-lambda-fastify.