Upload files

See all posts See thread Reply

Re: Upload files new!
by BPierre, 15 years, 4 months ago
Log :

- MIME type detected as regular file by UNIX file() command
...
file_src_mime : regular file


Terminal :

$ file -bi image.jpg
image/jpegReply
Re: Upload files new!
by colin, 15 years, 4 months ago
Thank you for the test.

I am quite surprised, because PHP executes file -bi image.jpg in the class code, through shell_exec, and gets regular file. But if you run it at the command line, you have image/jpeg. There is something weird on MacOS, but I don't have a machine to investigate.

In the meantime, you can comment the block of code underneath: "// checks MIME type with shell if unix access is authorized". This will deactivate this method of MIME detection, and the class should work again.Reply