• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

What is the MIME type for pdf files?

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Balaji.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic