Vineeth Aravindakshan wrote:
Is there any way of finding the mimetype or the type of the file when
there is no file extension.

Not easily. You can open the file, read some, then use the unknown content decoder. On OSes that have a non-extension MIME registry (basically OSX and BeOS) GetTypeFromFile() might work better.

What we should _really_ do is make GetTypeFromFile() do the "read a little bit" thing, imo. There's a longstanding bug on that; it's just that no one has had a chance to do it.

Of course the unknown decoder only recognizes a very very short list of types...

-Boris
_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to