Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle image/* content types #124

Open
sequencerr opened this issue Feb 1, 2025 · 4 comments
Open

Handle image/* content types #124

sequencerr opened this issue Feb 1, 2025 · 4 comments

Comments

@sequencerr
Copy link

https://apod.nasa.gov/apod/image/2501/HubblesVariablecopy1024.jpg
you just wait 10s and see empty body. with texteara, but it's an attachment. maybe preview media at the end of download, or update preview with each chunk?

@danirod
Copy link
Owner

danirod commented Feb 2, 2025

It's currently not designed to handle the content type image/jpeg, but this is clearly a missing feature.

@danirod danirod changed the title [feature] Preview body Handle image/* content types Feb 2, 2025
@danirod danirod added this to Cartero Feb 2, 2025
@danirod danirod moved this to To Do in Cartero Feb 2, 2025
@danirod danirod moved this from To Do to Needs Think in Cartero Mar 14, 2025
@sverro2
Copy link

sverro2 commented Mar 25, 2025

Missing this feature as well. Just being able to save response body content as a file, instead of it showing it as binary text, would already be good enough for me (and if you want to show content text, please don't load all binary data as text if it is a big image)!

@sequencerr
Copy link
Author

Well any big chunk of data (e.g. above 1mb) should be truncated like in firefox devtools to not crash the textfield

@danirod
Copy link
Owner

danirod commented Mar 26, 2025

Possibly related: export responses, based on a prior conversation held in the Discussions section. These would be two separate things, which also makes more probable to at least advance any of them:

  • Displaying images in the program. Supposedly there are facilities in the framework to do that.
  • Export the response contents, or the entire response object as HAR. This would benefit not just images but also any kind of response.

And of course, as a follow up, once there is a way to download files, any unrecognized content type that is not designed to be treated as text (application/pdf, application/octet-stream, audio/, video/) should not be rendered at all. Can show in the panel a message like "Binary content (24.1 kB)" and another button to trigger the "Export response" action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Needs Think
Development

No branches or pull requests

3 participants