function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raja Bhandari 16Raja Bhandari 16 

How to check Mime Type (Content Type) of a file (NOT ATTACHMENT)?

Raj VakatiRaj Vakati
The ContentVersion and ContentDocument objects don't store MIME types.
They do, however, store a FileType, which contains strings like "WORD_X", "PDF", and "POWER_POINT_X", which you could potentially map to MIME types. ("UNKNOWN" is also one value for this field).Additionally, the original file's FileExtension is stored on these objects and could be mapped in your code to a relevant MIME type.

https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm
VishnuReddyVishnuReddy
Filetype Field on ContentVersion object doesn't store MIME type of a file it stores extension . Use FileType Field on ContentDocument Object it will give you MIME type of file. Please mark this as best answer if it helps.