4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 16, 2018, 10:53:05 PM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Help / Hilfe
| |-+  Bug Fixes & Patches
| | |-+  [1.7 - 1.7.7] uploading thumbnails fails due to missing MIME type
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
Author Topic: [1.7 - 1.7.7] uploading thumbnails fails due to missing MIME type  (Read 6759 times)
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 578

mmm PHP...


View Profile WWW
« on: March 18, 2010, 01:41:51 PM »

In some rare cases uploading thumbnail might fail, because the code that checks thumbnail's MIME type totally ignores MIME type that is set in includes/upload_definitions.php

In includes/upload.php find:
1
    foreach ($mime_type_match as $key => $val) {

Insert below:
1
2
3
4
5
6
7
8
9
10
      if (in_array($key$this->accepted_extensions['thumb'])) {
        if (
is_array($val)) {
          foreach (
$val as $key2 => $val2) {
            
$this->accepted_mime_types['thumb'][] = $val2;
          }
        }
        else {
          
$this->accepted_mime_types['thumb'][] = $val;
        }
      }


If you wish, you can safely delete this block of code as it's not being used anymore:
1
2
3
4
5
6
7
8
    //Thumbnails
    
$this->accepted_mime_types['thumb'] = array(
      
"image/jpg",
      
"image/jpeg",
      
"image/pjpeg",
      
"image/gif",
      
"image/x-png"
    
);
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.071 seconds with 19 queries.