On Fri, 27 May 2016, Rahul Khandelwal wrote:
I am using detect/stream api to retrieve the MIME type of the file. But it's not returning exact MIME type for some document if i am passing 1KB of data of that file.

That's expected

For example - For open office document it's returning application/zip
(parent MIME type) for .odp file instead of
"application/vnd.oasis.opendocument.presentation".

That's expected. From just the first few KB, all you can tell is the outer container, not the exact file type living with in

How can i get the exact MIME type by passing just small amount of data ?

Pass in all the data. Many types can only be distinguished with the whole file, not just part of it

Nick

Reply via email to