0

I came across something that i hope someone has a solution for. I have a form with a file upload that allows designspecific files (such as psd, ai, eps, pdf). With the standard Laravel mimes validation. This is ok for all files except EPS.

Somehow EPS is not identified as application/postscript but as application/octet-stream. So if I put eps in the mimes list then it will not be able to upload an eps file.

When the mimelist check is turned off and it accepts all files the eps file is saved as a bin file? I understand that this is probably because of the application/octet-stream identification.

Does anyone have a solution for this? preferably without changing core laravel features.

cheers

Rolf
  • 1
  • The duplicate answer, while referring to CSV, applies here as well. – ceejayoz May 31 '17 at 15:00
  • Laravel doesnt check the mime from the header. The getMimeType call guesses the mime type using two different techniques that I can see: Using a binary mime type technique looking at the output of the following command file -b --mime %s 2>/dev/null if it is supported. The second technique is using the finfo_open command if it does exist inside php. – Rolf May 31 '17 at 15:11

0 Answers0