# Incomplete usage of Content-Disposition causes unreadable invoices

**URL:** <https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155>\
**Category:** Uncategorized\
**Created:** [April 7, 2021, 9:33am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155 "2021-04-07T09:33:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [April 7, 2021, 9:33am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/1 "2021-04-07T09:33:51Z")

</div>

Edit: Please see emails at bottom.

L.S.

Just upgraded to 21.3.75 desktop edition on Windows 10. When I send an invoice an email with attachment.bin as attachment is produced instead of a properly named pdf invoice.

Possible bug?

Kind regards, Arjen

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [April 7, 2021, 10:09am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/2 "2021-04-07T10:09:14Z")

</div>

Not here - Windows 10, Manager Desktop Version 21.3.75

 ![image](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/0/a/0a07bfcc573ae6e298bc37e2bbeac801561524ce.png)

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [April 7, 2021, 10:36am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/3 "2021-04-07T10:36:52Z")

</div>

Yes the attachment show properly named within Manager, but not so in the actual email message sent.  
 ![afbeelding](https://us1.discourse-cdn.com/flex019/uploads/manager1/original/3X/9/a/9a9c70bda7ab2d18ec7ebc84c29229c5faa65904.png)

Thunderbird will show this to be a PDF document and will preview it. This is due to the content type.

```
Content-Disposition: attachment; filename=attachment.bin
Content-Transfer-Encoding: base64
Content-Type: application/pdf; name=attachment.bin

```

However, some other email clients as well as invoice processors and regular users do not know how to handle a file named attachment.bin

---

<div class="post-metadata">

**Author:** ![Joe91](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/joe91/32/35781_2.png) [@Joe91](https://forum.manager.io/u/Joe91)\
**Post date:** [April 7, 2021, 11:14am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/4 "2021-04-07T11:14:10Z")

</div>

Seems like problem with your email service than Manager

What email server are you using?

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [April 7, 2021, 12:42pm UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/5 "2021-04-07T12:42:15Z")

</div>

I am using protonmail via the proton mail bridge.

Verified in another administration using gmail. → No issue  
Thunderbird via Proton bridge → no issue.

It is something to look into some more if this is some special interaction between the bridge and manager. I do think that Proton is only looking at the message envelope/headers and not at it’s contents.

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [April 7, 2021, 2:00pm UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/6 "2021-04-07T14:00:16Z")

</div>

In additon, I ran wireshark on the connection to the bridge. The attachment is named correctly.

```
Content-Type: application/pdf; name="nameofinvoice.pdf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; read-date="Wed, 07 Apr 2021 13:19:47
+0000"; creation-date="Wed, 07 Apr 2021 13:19:47 +0000";
modification-date="Wed, 07 Apr 2021 13:19:47 +0000"

```

I surmise looking at the protonmail bridge code that they do expect the `filename` parameter to be present in `Content-Disposition`. Was this Header field recently added?

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [May 4, 2021, 7:00am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/7 "2021-05-04T07:00:25Z")

</div>

I have found some relevant information. There is some linguistic ambiguity in the documentation of the relevant RFC. Which has been discussed and concensus seems to be that the `filename` parameter should be present in the `Content-Disposition` header.

Relevant urls and quotes:  
[https://en.wikipedia.org/wiki/MIME#Content-Disposition](https://en.wikipedia.org/wiki/MIME#Content-Disposition)

> Many mail user agents also send messages with the file name in the _name_ parameter of the _content-type_ header instead of the _filename_ parameter of the header field _Content-Disposition_. This practice is discouraged, as the file name should be specified either with the parameter _filename_, or with both the parameters _filename_ and _name_

The following discussion is referred to:  
[https://mailarchive.ietf.org/arch/msg/ietf-smtp/KtN0TdoHDayKvKycNbsFD-GB-e4/](https://mailarchive.ietf.org/arch/msg/ietf-smtp/KtN0TdoHDayKvKycNbsFD-GB-e4/)

> Finally, if you have to include filename information, either put it in a  
> filename= parameter or both a filename= and name= parameter. Never ever use  
> just a name= parameter

Perhaps this can be logged as a bug with the upstream library used to for the mail functionality?

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [May 5, 2021, 1:29pm UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/8 "2021-05-05T13:29:37Z")

</div>

Recap: The attachments can possibly not be seen by software application / mail clients handling incoming PDF invoices. Bug can also be triggered by a secure email gateway. (Proton in my case).

---

<div class="post-metadata">

**Author:** ![lubos](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/lubos/32/62798_2.png) [@lubos](https://forum.manager.io/u/lubos)\
**Post date:** [May 5, 2021, 11:08pm UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/9 "2021-05-05T23:08:58Z")

</div>

> [@A-R](#):
>
> Perhaps this can be logged as a bug with the upstream library used to for the mail functionality?

Well, that would be .NET 5.0

Filename paratemer as per RFC has some outdated restrictions like max 8 character filenames and ASCII characters only. The world has moved on from this many many years ago.

So I assume .NET 5.0 is not using `filename` parameter at all because of these restrictions and is using non-standard `name` parameter instead.

I don’t think Microsoft would consider this a bug. They’ve done it on purpose.

---

<div class="post-metadata">

**Author:** ![A-R](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/a-r/32/4806_2.png) [@A-R](https://forum.manager.io/u/A-R)\
**Post date:** [May 7, 2021, 7:43am UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/10 "2021-05-07T07:43:13Z")

</div>

Thank you for taking the time to reply. I dove into this rabbit hole some more and found that there is actually a second incantation for this parameter called filename\* which takes an odd formatted UTF8 url encoded filename to work around the historic format. For reference example here: [browser - How to encode the filename parameter of Content-Disposition header in HTTP? - Stack Overflow](https://stackoverflow.com/a/6745788)

Nevertheless RFC’s discern between MUST, SHOULD, MAY (and perhaps more) this is a SHOULD and not a MUST. So the library is compliant, however they _COULD REALLY_ implement the filename\* 🙂

---

<div class="post-metadata">

**Author:** ![Ealfardan](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.manager.io/ealfardan/32/63166_2.png) [@Ealfardan](https://forum.manager.io/u/Ealfardan)\
**Post date:** [July 5, 2026, 8:21pm UTC](https://forum.manager.io/t/incomplete-usage-of-content-disposition-causes-unreadable-invoices/34155/11 "2026-07-05T20:21:09Z")

</div>

Uncategorized topics older than 3 years with no recent activity
