0

I have a file upload and when I test it on localhost all mime-types are ok. (txt, pdf, doc, docx, xls, xlsx)

When I test the same files on the server it changes all mime-types to application/octet-stream.

Is there any setting in PHP.ini or anywhere else to set it?

Server is using WAMP.

PHP Framework Nette

tttpapi
  • 887
  • 2
  • 9
  • 32

2 Answers2

0

The answer as someone mentioned above is the way the RFC spec works. Check out Why am I getting mime-type of .csv file as "application/octet-stream"? for more info.

Community
  • 1
  • 1
Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48
0

The problem was that there wasn't fileinfo extension in PHP on the server. After activating all works fine.

tttpapi
  • 887
  • 2
  • 9
  • 32