Giter Site home page Giter Site logo

hapi-lambda's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hapi-lambda's Issues

formdata image buffer upload format problem

I have upload images to a Hapi 17 route as form data and its always worked fine. I recently migrated the server code to serverless using hapi-lambda and everything has been working fine EXCEPT for file uploads.

If I output the formData.image[data] I get a different result from the output of the Hapi 17 server vs the output of the hapi-lambda server for the same file upload.

The "sharp" image processing has always worked with the Hapi 17 upload, but it fails with hapi-lambda, saying "Input buffer contains unsupported image format.

Does something additional need to be added to the transformRequest or transformResponse ?

Add support for multiValueHeaders

Hello!

I think this was added to AWS after this project was released, but in order to support array response (like how Hapi natively responds to set-cookie), you need to move the set-cookie (or other array values headers for that matter) from headers to multiValueHeaders.

Let me know if you'd like a PR for this!

issue with Hapi View result

Hi,
I am using Hapi with route and view for website. I have template and layout.
I found that:
const response = { statusCode: res.statusCode, headers: res.headers, body: typeof res.result === 'string' ? res.result : JSON.stringify(res.result) };

The body display wrong value of html, return encoded code. If I set html value, it display ok, so I think res.result is not correct or it may be encoded.

You can see the web page display here:
https://drive.google.com/open?id=10QYlq3q6Gc3yjXE4c3K1ezKm5-oHGG9u

Please help me to explain if I have wrong setup.
Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.