User tests: Successful: Unsuccessful:
Pull Request for Issue #16086
A better way to check the MIME file type if the operating system is incorrectly configured.
If you still have a problem and your server is not running on Windows, test the following patch:
diff --git a/libraries/src/Helper/MediaHelper.php b/libraries/src/Helper/MediaHelper.php
index 60f7fab83d..99cb1d80e1 100644
--- a/libraries/src/Helper/MediaHelper.php
+++ b/libraries/src/Helper/MediaHelper.php
@@ -102,6 +102,12 @@ class MediaHelper
$mime = isset($imagesize['mime']) ? $imagesize['mime'] : false;
}
}
+
+ // Last chance to get to know the type of mime
+ if (!$mime && IS_UNIX && function_exists('exec') && function_exists('escapeshellarg'))
+ {
+ $mime = strtok(exec('file -bi ' . escapeshellarg($file)), ';');
+ }
}
catch (\Exception $e)
{
Try to upload pdf or image file.
Take a look at #16086
Please test if you still interested @goforitweb, @uglyeoin, @edthenet, @OrignlCin
PDF file is recognized.
No
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
Title |
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-07-18 09:43:54 |
Closed_By | ⇒ | csthomas |
2 weeks and no interest, so I do not understand why I am trying to help someone.