On 10/2/23 01:38, Tim via users wrote:
On Thu, 2023-02-09 at 21:05 +1100, Stephen Morris wrote:
I've checked two mails with attachments, one mail has the pdf attachment
as content type application/binary-octet and the other has the content
type of application/pdf on the attachment and the issue occurs with both
of them.
On that note, it's not a good idea to try and get your program to open
PDFs sent as application/binary-octet, because it'll try to do the same
thing with any other non-PDF file. Fun and chaos will ensue.
I had no idea that mime type was being used for the mail attachment
until I viewed the mail source and searched through the source for the
attachment that I found what mimetype the attachment had been added with.
You can try setting it to pass the file to xdg-open, and then xdg-open
will try opening the file in the right application for what the file
is. See if that changes anything.
To use xdg-open do I need to save the attachment first, or if not, when
I am clicking on the attachment in the attachment bar at the bottom of
the mail, to browse the attachment, how do I pass that into xdg-open?
If you allow Thunderbird to directly open the PDF in Okular, can you
view properties of the PDF file in Okular, and see where the temporary
file is being loaded from?
The attachments are being saved to a sub-folder of /tmp where the
sub-folder name looks like it may have been named to reflect the pid of
Thunderbird.
A wild thought: Is it a filename with blank spaces in it?
The attachment that is mimetype application/binary-octet does have
embedded blanks in the attachment name, the attachment that is mimetype
application/pdf doesn't have embedded blanks in the attachment name.
Interestingly, I registered Acrobat as the default application for
mimetype application/pdf, so when I clicked on the application/pdf
mimetype attachment the prompt asked me if I wanted to open it the
default of Acrobat, but to check to location of the file I selected
Okular instead.
When I then opened the email that had the mimetype
application/binary-octet attachment, when I clicked on the attachment
the prompt asked me if I wanted to open the file in Okular even though
it had Acrobat as the default.
What I don't know from this functionality is whether what I'm seeing is
standard Linux, or a feature of the version of Thunderbird I am using,
as I expected the prompt to ask whether I wanted the file to be opened
in whatever was the default application for the associated mimetype.
regards,
Steve
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue