0

I am trying to modify "Content-Disposition" value in "multipart/form-data" POST request with Fiddler that is automatically generated by webpage's javascript with attached image on file upload.

However, I cannot find a way to do it: when I try to simply replace the "Content-Disposition" Fiddler seems to convert entire content to string, replace the Content-Disposition string and convert back to bytes, which seems to break the attached image.

Several examples of code I have tried to use:

oSession.utilReplaceInRequest("string1","string2")
var strBody=oSession.GetRequestBodyAsString();                                                    
strBody=strBody.replace("string1","string2");
oSession.utilSetRequestBody(strBody);

While these successfully replace string1 with string2, the attached image is no longer valid.

What would be a way to do it?

Murumuru
  • 33
  • 6
  • Please edit your question and include the code you are using and that does not work correctly. – Robert Jun 24 '19 at 13:55
  • @Robert, Added code examples. I assume the problem is with string conversion but I do not know and could not find a way to do it other way. – Murumuru Jun 24 '19 at 18:54

0 Answers0