Skip to content

Made attachments serve via URL instead of embedding them in the JSON response#139

Open
Servus-Altissimi wants to merge 2 commits intotweedegolf:mainfrom
Servus-Altissimi:main
Open

Made attachments serve via URL instead of embedding them in the JSON response#139
Servus-Altissimi wants to merge 2 commits intotweedegolf:mainfrom
Servus-Altissimi:main

Conversation

@Servus-Altissimi
Copy link
Copy Markdown

As discussed in Issue 126 Large attachments and raw message bytes were being base64 encoded directly into the GET /api/message/{id} JSON response. This isn't an issue for smaller files, but larger attachments caused the UI to freeze, as the browser had to deserialize it all.

Hence I made the following changes:

  • Attachment content and raw message bytes are no longer serialized into the JSON response
  • Added endpoints to serve the raw message on demand
  • Attachment downloads now point to the existing /api/message/{id}/attachment/{index} endpoint
  • Inline (cid:) images in HTML emails are rewritten to use the attachment endpoint
  • Raw tab content is fetched only when opened
  • Added a test that sends a 75 MiB attachment and verifies it

I haven't bumped cargo version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant