You need to sign in to do that
Don't have an account?
vivek g
How to get type of a file in <apex:inputfile>
Hi All,
how to get "type" of a file in <apex:inputfile>.
type is nothing but Extension of file.
For Eg:1) Type=xls for excel
2) Type=txt for text files.
Thanks,
Vivek g.
Please let me know if the following script works for you
<input type="file" value="{!attachment.body}" name="{!attachment.name}" id="file" accept="image/jpeg, image/png"> </input>
Best Regards
Naga kiran
Refer the following link, you get some idea about your requirement.
https://developer.salesforce.com/forums/ForumsMain?id=906F000000097bLIAQ