Bläddra i källkod

Added Content-Type to procies images and audio

ManeraKai 2 år sedan
förälder
incheckning
6783b6e97e
2 ändrade filer med 4 tillägg och 3 borttagningar
  1. 2 1
      pages/audio.php
  2. 2 2
      pages/image.php

+ 2 - 1
pages/audio.php

@@ -6,6 +6,7 @@
     return strlen($data);
   });
 
-  header("Content-Type: application/octet-stream");
+  $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
+  header("Content-Type: $contentType");
   curl_exec($ch);
 ?>

+ 2 - 2
pages/image.php

@@ -17,8 +17,8 @@
         echo $data;
         return strlen($data);
       });
-
-      header("Content-Type: application/octet-stream");
+      $contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
+      header("Content-Type: $contentType");
       curl_exec($ch);
 
       break;