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?
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
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With