+ 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