{"action":"opened","issue":{"url":"https://api.github.com/repos/jeremydaly/lambda-api/issues/54","repository_url":"https://api.github.com/repos/jeremydaly/lambda-api","labels_url":"https://api.github.com/repos/jeremydaly/lambda-api/issues/54/labels{/name}","comments_url":"https://api.github.com/repos/jeremydaly/lambda-api/issues/54/comments","events_url":"https://api.github.com/repos/jeremydaly/lambda-api/issues/54/events","html_url":"https://github.com/jeremydaly/lambda-api/issues/54","id":343247077,"node_id":"MDU6SXNzdWUzNDMyNDcwNzc=","number":54,"title":"Downloaded zip files result in Base 64 encoded files.","user":{"login":"nathan-osg","id":4387884,"node_id":"MDQ6VXNlcjQzODc4ODQ=","avatar_url":"https://avatars1.githubusercontent.com/u/4387884?v=4","gravatar_id":"","url":"https://api.github.com/users/nathan-osg","html_url":"https://github.com/nathan-osg","followers_url":"https://api.github.com/users/nathan-osg/followers","following_url":"https://api.github.com/users/nathan-osg/following{/other_user}","gists_url":"https://api.github.com/users/nathan-osg/gists{/gist_id}","starred_url":"https://api.github.com/users/nathan-osg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nathan-osg/subscriptions","organizations_url":"https://api.github.com/users/nathan-osg/orgs","repos_url":"https://api.github.com/users/nathan-osg/repos","events_url":"https://api.github.com/users/nathan-osg/events{/privacy}","received_events_url":"https://api.github.com/users/nathan-osg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-20T21:04:55Z","updated_at":"2018-07-20T21:04:55Z","closed_at":null,"author_association":"NONE","body":"First of all, just wanted to say nice work! It's nice to have such a streamlined library for use within a Lambda!\r\n\r\nI'm trying to use the library for some downloading of binary files from S3... usually Zip file. This was incredibly easy to get set up! And yes, I did follow the instructions to enable binary mode by adding */* in API Gateway.\r\n\r\nThe problem I am having is that I can't unzip the file after I have downloaded it as it is still base64 encoded. I can decode it manually and then unzip it, so I do know that this is the problem.\r\n\r\nI'm trying to understand the reason for the base64 encoding... we should be able to download non-encoded files. It seems that the reason this encoding was performed is some requirement in API Gateway, is that the case? Maybe your Integration has CONVERT_TO_BINARY set?\r\n\r\nI'm trying to read the AWS [documentation](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-payload-encodings.html) to figure out if that needs to be set... Per that link: \r\n\r\n\"For API Gateway to pass binary payloads, you add the media types to the binaryMediaTypes list of the RestApi resource **OR** set the contentHandling properties on the Integration and the IntegrationResponse resources.\"\r\n\r\nSo, does CONVERT_TO_BINARY really need to be set? And, if not, should \"lambda-api\" be encoding it as Base64?\r\n\r\n"}}
{"actor":{"display_login":"nathan-osg"}}