Excerpts from Rejeesh K.Nair's message of 2017-02-07 15:49:42 +0530:
> I have checked the MIME information of a specific file using its extension.
> But actually I need details of exact file.

I'm a newbie with the Koha source code.  But I'm wondering if there
is some way you could use the external "file" program from within
Koha to determine the file type.  This program is not fooled by
file name extensions; it examines the file contents to determine
the type.  Here is an example of a test I ran where I renamed a .pdf
file with .jpg extension in an attempt to fool file:

  $ cp koha-notes.pdf junk.jpg
  $ file -i junk.jpg
  junk.jpg: application/pdf; charset=binary
_______________________________________________
Koha mailing list  http://koha-community.org
Koha@lists.katipo.co.nz
https://lists.katipo.co.nz/mailman/listinfo/koha

Reply via email to