소스 검색

Add files via upload

Capitan Cloud 3 년 전
부모
커밋
386efcdcd2
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  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.");