• Post Reply Bookmark Topic Watch Topic
  • New Topic

What is the MIME type for pdf files?

 
Kishore Sirivelu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to save an attached pdf file from a message. But I should save it only after confirming that it is a pdf file. For that, I'm checking the mimetype as "APPLICATION/PDF". However, I'm unable to save the file because the mimetype is showing up as "APPLICATION/OCTET-STREAM".
Does anyone know?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kishore Sirivelu:
I'm trying to save an attached pdf file from a message. But I should save it only after confirming that it is a pdf file. For that, I'm checking the mimetype as "APPLICATION/PDF". However, I'm unable to save the file because the mimetype is showing up as "APPLICATION/OCTET-STREAM".
Does anyone know?

Yes thats true, when u receive a file via email or a webservice, the mimetype will show only as "APPLICAITON.OCTET-STREAM".
But you can check the file name and its extension by using getFileName() method, and then u can proceed further.. a temp solution.
 
Kishore Sirivelu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Balaji.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!