use dd(Input::file('input_name')->getMimeType() ) to see those pdf's mimetype :) , and then support them too ;)
'application/octet-stream'
Hello!
I have an application based on Laravel 4.2.17 with file upload funcionality. Everythink works fine except uploading of some PDF files.
During last few days my colleague uploaded several hundreds of PDF files, but several of them can't be uploaded. When we tried to open it, they seems normal like any other PDF file.
dd(Input::('file')) says this:
Symfony\Component\HttpFoundation\File\UploadedFile Object
(
[test:Symfony\Component\HttpFoundation\File\UploadedFile:private] =>
[originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] => ponuda524.pdf
[mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] => application/octet-stream
[size:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 0
[error:Symfony\Component\HttpFoundation\File\UploadedFile:private] => 1
[pathName:SplFileInfo:private] =>
[fileName:SplFileInfo:private] =>
)
We suspect that the problem is related to detection of mimetypes. PDF files are made from Word 2010 docx files, converted with Nitro Professional 7 and "Save as.." option built in Word. Both failed.
Please or to participate in this conversation.