Post JPEG file using fiddler with other body data -
im trying post jpeg file locally developed web service via fiddler. simple enough, need include data alongside file , can’t quite nail syntax fiddler wants. if click upload file button , select file upload, replaces post body with:
---------------------------acebdf13572468 content-disposition: form-data; name="fieldnamehere"; filename="pantheraleo.jpg" content-type: image/jpeg <@include *c:\temp\pantheraleo.jpg*@> ---------------------------acebdf13572468— now want add additional data:
user=1&album=2&photo=[output file upload] i’ve tried putting @ start of body, when node app receives request, i’m getting user parameter, album parameter no photo. ideas how can format request both parameters , photo uploaded photo parameter?
i've been looking similar myself , stumbled on question. i've managed achieve needed after bit of messing fiddler. try this:
---------------------------acebdf13572468 content-disposition: form-data; name="model" mymodelinfo ---------------------------acebdf13572468 content-disposition: form-data; model="test123"; filename="123.gif" content-type: image/gif <@include *z:\downloads\123.gif*@> ---------------------------acebdf13572468-- it seem link form data being sent in request body 'acebdf13572468' boundary in post info. provide content-disposition key name (in case 'model') , following line represents actual value key. (in case "mymodelinfo".
using above request body able post file accompanying post data api.
Comments
Post a Comment