just let me know r u getting that attachement from attachment object or not? if yes then in that u have a field called content type.. from that u will get the type of the attachement like if it is pdf u will get application/pdf...so on..
No. I am uploading the file into the vf page and store it in a attachment. While uploading i must check it is pdf or not. If not, I should throw an error message to the user.
just let me know r u getting that attachement from attachment object or not? if yes then in that u have a field called content type.. from that u will get the type of the attachement like if it is pdf u will get application/pdf...so on..
No. I am uploading the file into the vf page and store it in a attachment. While uploading i must check it is pdf or not. If not, I should throw an error message to the user.
when u are uploading the file u will get the name along with extension like filename.pdf...may be u need to find in this way only...