Browse Source

Add files via upload

Capitan Cloud 2 years ago
parent
commit
386efcdcd2
1 changed files with 5 additions and 1 deletions
  1. 5 1
      Public/index.php

+ 5 - 1
Public/index.php

@@ -118,7 +118,11 @@ switch ($url) {
     }  
        
     if (filesize($picPath) <= APP_FILE_MAX_SIZE) { 
-      header("Content-Type: image/" . $fileExt);
+      if ($fileExt = "jpg") {
+        header("Content-Type: image/jpeg");
+      } else {
+        header("Content-Type: image/" . $fileExt);
+      }  
       echo(file_get_contents($picPath));
     } else {
       die("picture size over app limits.");