Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3655

AWS API Gateway - send querystring parameters with HTML POST with enctype="multipart/form-data"

$
0
0

I receive the file content OK, but cant seem to get the query string no matter what I do. The Lambda Integration feature doesnt retrieve them and no matter whgat I put in the mapping template I do not receive any parameters. Even with the the generated 'pass-through-everything' template I get an empty queryString block.

I get the file content OK using:

"content": "$input.body"

For the mapping I have tried

"try1":"$input.params('paramname')","try2":"$input.params().querystring('paramname')","try3":"$input.params().querystring.get('paramname')","try4":"#foreach($key in $input.params().querystring.keySet())#if($foreach.index > 0)&#end$util.urlEncode($key)=$util.urlEncode($input.params().querystring.get($key))#end"

but always get empty strings for all the above in my event in the lambda function.

If I dont use

enctype="multipart/form-data"

The query string is accessible, though as expected I lose my file content.

How can I get my query string AND file content?


Viewing all articles
Browse latest Browse all 3655

Trending Articles