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

API call not returning image, just a tiny blank image #21

Open
davecoffin opened this issue Jan 25, 2018 · 4 comments
Open

API call not returning image, just a tiny blank image #21

davecoffin opened this issue Jan 25, 2018 · 4 comments

Comments

@davecoffin
Copy link

Hey there, I am super pumped to use this as it is exactly what I need. I have installed serveless and deployed my service without any issues, but I'm confused as to exactly what I should be expecting. According to your documentation, if the image requested doesn't exist in the S3 bucket it will create it AND return it. If it does it will just return it. But I am experiencing something odd... I have an image in my bucket called noah2invitation.jpg, and if I request that image with my serverless-created api url, I get a small blank image:
Heres a screenshot: https://cl.ly/p5bO
https://e5eqvjclo9.execute-api.us-east-1.amazonaws.com/dev/noah2invitation.jpg

Here is the image in my bucket:
https://s3.amazonaws.com/dev-dailynanny-photos/noah2invitation.jpg

Then, if I request a transformation:
https://e5eqvjclo9.execute-api.us-east-1.amazonaws.com/dev/noah2invitation.jpg?w=100&h=100

I get the same small blank image, but it does create the image in my bucket:
https://s3.amazonaws.com/dev-dailynanny-photos/noah2invitation.jpg%3Fh%3D100%26w%3D100

Why arent the API calls returning the images?

Thanks, and thanks for making this!

@marcusmolchany
Copy link
Collaborator

Hey @davecoffin, thanks for the detail here. Have you set up the binary support with api gateway?

@davecoffin
Copy link
Author

Yes I have, but the flow has changed since the documentation was last authored (in fact, I havent read any documentation that references the current state of their UI, it must have been updated recently?). Here's what I have done, please let me know if this is enough:

https://cl.ly/p62x

It appears to be automatically deployed, I didn't find anything anywhere to "deploy" the api.

@davecoffin
Copy link
Author

@marcusmolchany Any thoughts on this?

@pabloheimplatz
Copy link

pabloheimplatz commented Mar 26, 2018

@davecoffin just click on the top left on the name of your API gateway function (dev-Image-Resizer). There you will find the "Action" button where you can deploy the API.
After that change it works for me.

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

3 participants