[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fake PDF
[Thread Prev] | [Thread Next]
- Subject: Re: Fake PDF
- From: Gianluigi <gradobag@xxxxxxxxxxx>
- Date: Tue, 24 Feb 2026 17:11:47 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
Il 24/02/26 16:49, Lee ha scritto:
Well, I'm not Benoît, but I can tell you that it is not a mistake on your part and that the Mime type IS working.The code of DesktopMime.FromFile() tries first to determine the MIME type by querying the MIME database file (/usr/share/mime/globs2) which lists the MIME type based on the file's extension. On my system, line 139 of that file indicates that "*.pdf" files are of type "application/ pdf".It can be fooled if the extension is not correct. If you need better mime type determination, you can shell out to `file`.
Hi Lee,I'm probably not understanding what you're trying to say. I tried using BaseName, but I get an error and don't get "File type: Plain Text Document (text/plain)" like I get when opening the same file with Mint's document viewer.
Regards Gianluigi
| Re: Fake PDF | gbWilly <gbWilly@xxxxxxxxxxxxxx> |
| Re: Fake PDF | Lee <t.lee.davidson@xxxxxxxxx> |
| Fake PDF | Gianluigi <gradobag@xxxxxxxxxxx> |
| Re: Fake PDF | Lee <t.lee.davidson@xxxxxxxxx> |