aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/upload.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/upload.php b/lib/upload.php
index ac926403d..30540dced 100644
--- a/lib/upload.php
+++ b/lib/upload.php
@@ -11,7 +11,7 @@
*/
function tp_upload_get_mimetype($originalName) {
$extension = substr(strrchr($originalName, '.'), 1);
- switch ($extension) {
+ switch (strtolower($extension)) {
case 'png':
return 'image/png';
break;
@@ -19,9 +19,12 @@ function tp_upload_get_mimetype($originalName) {
return 'image/gif';
break;
case 'jpg':
- default:
+ case 'jpeg':
return 'image/jpeg';
break;
+ default:
+ return 'unknown';
+ break;
}
}