how to grab the uploaded file from charles network utility
Asked Answered
H

1

11

I'l like to save and extract the file part from a multipart http upload recorded by Charles network utility on the mac. Is there a way to do this? For instance, I can see the jpeg files contents in the request text, but if I try to copy and paste that into a file, it is an invalid file. I'd like to simply just save to disk the file that was captured.

Historian answered 22/7, 2013 at 22:26 Comment(1)
Did you ever get this to work?Nucleoside
B
13

Using Charles 4.1.3:

  • Right-click request in Structure pane
  • Select "Export..."
  • Select Format "HTTP Trace File (.trace)", name the file
  • Open the file in a text editor, such as TextMate. When asked for encoding, Western - ISO Latin 1 is just fine
  • Remove all text from the start that contains header info, up until and including the line that says something like "Request-Body:<<--EOF-1498740958503-"
  • Scroll all the way down, and remove all text starting at the line that looks like this: "--EOF-1498741139055-"
  • Save
  • Preview will already be an image. When renamed to the actual format, more information, such as image size, will become available
Bukavu answered 29/6, 2017 at 13:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.