mime type detection for upper case filenames
- Status
- Pending
- Subject
- mime type detection for upper case filenames
- Version
- 12.x
14.x
15.x - Category
- Error
- Feature
- File Gallery (elFinder or standard UI)
- Resolution status
- Please retest
- Submitted by
- wellenvogel
- Volunteered to solve
- Jonny Bradley
- Lastmod by
- Jonny Bradley
- Rating
- Related-to
- Description
When uploading files in the file gallery (XXX.JPG) with uppercase filenames they will be detected as application/octet-stream (XAMPP on Windows 7).
Instead they should be recognized as jpeg.Proposed patch (i.e. convert extension to lower case before testing for mime type).
--- mimelib-ori.php 2013-12-07 13:07:10.000000000 +0100 +++ mimelib.php 2013-12-07 13:08:07.000000000 +0100 @@ -101,7 +101,7 @@ global $mimetypes; include_once('lib/mime/mimetypes.php'); if (isset($mimetypes)) { - $ext = $this->get_extension($filename); + $ext = strtolower($this->get_extension($filename)); $mimetype = isset($mimetypes[$ext]) ? $mimetypes[$ext] : ''; if (!empty($mimetype)) {- Solution
- r58235 in tiki 15.x?
- Importance
- 4
- Easy to solve?
- 10 easy
- Priority
- 40
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 5037
- Created
- Saturday 07 December, 2013 12:25:37 UTC
by wellenvogel - LastModif
- Thursday 07 April, 2016 12:11:30 UTC