DokuWiki

It's better when it's simple

User Tools

Site Tools


faq:uploadcontentcheck

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
faq:uploadcontentcheck [2011-07-13 14:17] 137.193.251.30faq:uploadcontentcheck [2011-10-22 06:20] (current) – old revision restored 24.18.132.182
Line 17: Line 17:
 </code> </code>
  
-Another possibility is to change the "media_contentcheck" function in the "media.php" file which is placed in the "inc" folder. 
- 
-<code php> 
-if(substr($mime,0,6) == 'image/'){ 
-        $info = getimagesize($file); 
-        if($mime == 'image/gif' && $info[2] != 1){ 
-            msg(sprintf('php function getimagesize(%s) does not think this is an image/gif file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime)); 
-            return 0; 
-        }elseif($mime == 'image/jpeg' && $info[2] != 2){ 
-            msg(sprintf('php function getimagesize(%s) does not think this is an image/jpeg file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime)); 
-            return 0; 
-        }elseif($mime == 'image/png' && $info[2] != 3){ 
-            msg(sprintf('php function getimagesize(%s) does not think this is an image/png file (info[2]=%d) even though %s is the mime type',$file,$info[2],$mime)); 
-            return 0; 
-        } 
-</code> 
faq/uploadcontentcheck.1310559443.txt.gz · Last modified: 2011-07-13 14:17 by 137.193.251.30

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki