Workaround for gmail error “downloading this attachment is disabled”

Workaround for gmail error “downloading this attachment is disabled”

I wanted to download an attachment that was sent to me years ago, but now gmail is blocking the download of files with attachments it doesn’t like and gives the user no way to download it. Their helpful advice was to ask the original sender to upload it to Google Drive. Not helpful if the original sender doesn’t have the file because it is a decade old.


Gmail has your data right there, it just thinks it knows better than you. Maybe this helps protect some people. But I just want my file.


The first thing to do is view the original source by clicking on the three dots at the top right of the email

The click the Download Original link and open the file in a text editor. At the top of the file you will find the message header and body, and just after that you will find the attachments are encoded as text using base64 encoding. Each attachment will look like a block like this:

Content-Type: application/pdf; name=""
Content-Disposition: attachment; filename=""
Content-Transfer-Encoding: base64
X-Attachment-Id: 123456789_0.1



Either copy and past the content between the X-Attachment and before the end of record into a new file, or for very large attachments delete everything except the encoded attachment.

On a Mac/Unix environment you can use the base64 program to decode the attachment


cat encoded.txt | base64 --decode >