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
VisualforceDevVisualforceDev 

Creating a blob with inputFile

Hi there. If I have a blob property in my controller that is bound to an <apex inputFile....

and I want to create an attachment from it, how can I determine the ContentType for the attachment?
Thanks 

Best Answer chosen by Admin (Salesforce Developers) 
Cool_DevloperCool_Devloper

You can use the "ContentType" property of the <apex:inputFile> to get the content type in your controller!

Cool_D