Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I see submitted POST request data in Chrome DevTools for multipart/form-data [duplicate]

I'm creating some performance tests for a web application that sends requests of the same type that a browser would send to our server. One of these requests is a POST that uploads an image. I looked at this question where it looks like the actual contents of the image file should be inside the body of the request. However when I use F12 dev tools in Chrome to inspect what the browser sends in the request it looks like this:

  ------WebKitFormBoundaryjHN86sGb89n2HUZOT
  Content-Disposition: form-data; name="profileImg[]"; filename="bmp.bmp"
  Content-Type: image/bmp


  ------WebKitFormBoundaryjHN86sGb89n2HUZOT--

The space where I expected to see the file contents is blank. I was expecting to see some string of seemingly random characters representing the contents of the image file. There's also no path to the image in the request, only the name of the file, so I can't understand exactly how the file could be uploaded? Is Chrome just hiding the data from me?

like image 763
EJS Avatar asked Dec 09 '15 09:12

EJS


2 Answers

Chrome hides the file data, when viewing the request payload using dev tools, for performance reasons:

https://groups.google.com/forum/#!topic/google-chrome-developer-tools/FaInquBDhU0

like image 175
Jeb Avatar answered Nov 19 '22 10:11

Jeb


So I downloaded Fiddler and it actually shows that there is data being sent where we in Chrome see only a blank space. This means that Chrome does indeed hide the data.

like image 40
EJS Avatar answered Nov 19 '22 10:11

EJS