[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fake PDF
[Thread Prev] | [Thread Next]
- Subject: Re: Fake PDF
- From: Lee <t.lee.davidson@xxxxxxxxx>
- Date: Tue, 24 Feb 2026 10:49:07 -0500
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 2/24/26 5:26 AM, Gianluigi wrote:
Hi Benoit, Is this a mistake on my part, or is the MIME TYPE not working? See the attached example. Thanks, regards Gianluigi
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`. -- Lee --- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ---- --- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----
| Re: Fake PDF | Gianluigi <gradobag@xxxxxxxxxxx> |
| Fake PDF | Gianluigi <gradobag@xxxxxxxxxxx> |