KartikTalwar / gmail.js

Gmail JavaScript API
MIT License
3.74k stars 456 forks source link

Bug: Parse attachment URL #742

Closed obogdanov-entrypoint closed 1 year ago

obogdanov-entrypoint commented 1 year ago

Encountered an issue with attachment URL. api.tools.parse_attachment_url parses URL incorrectly, so wrong URL is formed, causing attachment base64 to be bloated (about 1.1 MB) and having wrong content. In result files are bloated (1KB turns into ~1MB) and invalid.

Seems like something changed on Gmail side, currently url parts look like this: image

This change should fix it (tested locally): image

josteink commented 1 year ago

PRs appreciated :)