Browse Source

Add files via upload

Capitan Cloud 2 năm trước cách đây
mục cha
commit
386efcdcd2
1 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 5 1
      Public/index.php

+ 5 - 1
Public/index.php

@@ -118,7 +118,11 @@ switch ($url) {
     }  
     }  
        
        
     if (filesize($picPath) <= APP_FILE_MAX_SIZE) { 
     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));
       echo(file_get_contents($picPath));
     } else {
     } else {
       die("picture size over app limits.");
       die("picture size over app limits.");