maciejtreder / serverless-apigw-binary

Serverless plugin for binary files support in AWS Gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python exemple

feraudet opened this issue · comments

Do you have a python exemple ?

curl -X POST -H 'Content-Type: multipart/form-data' -F "image=@picture.jpg" 'https://blahblah.execute-api.eu-west-1.amazonaws.com/dev/test

give me an event like this :

{ "body": "--------------------------78354a54cba112e5\r\nContent-Disposition: form-data; name=\"image\"; filename=\"picture.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n����\u0000�DataLen: 00043855\r\nCamTim: 2017-09-17 Sun 05:01:49\r\nFrmRate: 30\r\nTimStamp: 3182125129\r\nCamPos: 111000000000064S\r\nAlmEvent: 0000000000000000\r\nAutoFlip: 0\r\n\u0000\u0000��\u0000\u0010JFIF\u0000\u0001\u0002\u0001\u0000\u0000\u0000

but I don't know how to extract picture datas :(

Thanks in advance,

Cyril