I'm using serverless-http to make an express endpoint on AWS Lambda - pretty simple in general. The flow is basically:
- POST a zip file via a multipart form to my endpoint
- Unzip the file (which contains a bunch of excel files)
- Merge the files into a single Excel file
- res.sendFile(file) the file back to the user
I'm not stuck on this flow 100%, but that's the gist of what I'm trying to do.
Lambda functions SHOULD give me access to /tmp
for storage, so I've tried messing around with Multer
to store files there and then read the contents, I've also tried the decompress-zip
library and it seems like the files never "work". I've even tried just uploading an image and immediately sending it back. It sends back an files called incoming.[extension]
, but it's always corrupt. Am I missing something? Is there a better way to do this?