Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for binary file #19

Open
dod91 opened this issue Aug 27, 2019 · 3 comments
Open

Support for binary file #19

dod91 opened this issue Aug 27, 2019 · 3 comments

Comments

@dod91
Copy link

dod91 commented Aug 27, 2019

Hi,
I'm trying to use serverless-express for sending binary data (application/zip) as response but I'm unable to do it.
AWS forum talks about a custom response with isBase64Encoded key on the response but it doesn't seem to be covered on this library.
Am I missing something or do you have any example or documentation for it?

Thank you.

@mikestaub
Copy link
Owner

I think this is out of scope for this plugin. Have you tried using this one? https://github.com/maciejtreder/serverless-apigw-binary

@dod91
Copy link
Author

dod91 commented Sep 2, 2019

Hello @mikestaub thank you for your response.
Yep I've tried it but didn't work right for me; currently I've solved it by sending a base64 of the file and then doing t he job client side but that's just a workaround for small files.

Still looking for something better :)

@mikestaub
Copy link
Owner

To be honest, I feel like you should be serving binary files from S3/Cloudfront, not express. This plugin was created for API servers. I think we can make it work for binary responses but I don't have time right now to investigate. I'm happy to work with you on a PR if you want to take this on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants