Hi..,
There is a PDF file which i want to upload on my server.
Before upload,I want to set the Content-type of this file.
So i have code the following lines to get the Content Type of file.
File FileName=new File("c:\\abc.pdf");
FileTypeMap fMap=FileTypeMap.getDefaultFileTypeMap();
String sContentType="";
sContentType= fMap.getContentType(FileName);
After execution of this code it is returning the content-type
"application/octet-stream"
So how can i get the Content-Type of this file?
Can anybody help me to solve this problem
Thanks