Files
ThreadNet-Web/apps
hayyaksiandGitHub da500d4b7d Fetch authenticated media through the session for "Save image as" (#33997)
* Fetch authenticated media through the session for "Save image as"

The desktop "Save image as" context-menu item fetched http(s) images with the
main-process global fetch(), which bypasses the session's webRequest interceptors —
including the authenticated-media handlers in media-auth.ts that rewrite the download
URL and attach the Authorization header. On modern Synapse (authenticated media,
MSC3916) that fetch is rejected with 401/404, so saving an image failed (#32362).

Extract the save logic into a dedicated save-image.ts and fetch network URLs through
the image's Electron session (webContents.session.fetch) so the auth interceptors
apply; data: URLs are still decoded directly into a NativeImage. The module also keeps
the extension-aware encoding (jpg/jpeg/bmp/png) so its contract can be unit-tested.

* Use the contributor's own copyright header on the new save-image files
2026-07-14 11:26:06 +00:00
..