diff --git a/public/API/getFile.php b/public/API/getFile.php
index 4004bfde78111af430aae4a1d289984135ca1455..d76c9d5b01a15aead4fd092b3dafba5db69e75ad 100644
--- a/public/API/getFile.php
+++ b/public/API/getFile.php
@@ -24,4 +24,15 @@ $presignedRequest = $s3Client->createPresignedRequest($command, '60 minutes');
 
 // Get the actual presigned-url
 $downloadURL =  (string)  $presignedRequest->getUri();
-header("Location: $downloadURL");
\ No newline at end of file
+
+$curl = curl_init();
+curl_setopt($curl, CURLOPT_URL, $downloadURL);
+curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1);
+curl_setopt ($curl, CURLOPT_CONNECTTIMEOUT, 20);
+curl_setopt ($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
+curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, true);
+
+$content = curl_exec ($curl);
+$contentType = curl_getinfo($curl, CURLINFO_CONTENT_TYPE);
+header('Content-Type: ' . $contentType);
+echo($content);
\ No newline at end of file