diff --git a/api.php b/api.php index e60e96c..1ee14f1 100644 --- a/api.php +++ b/api.php @@ -21,12 +21,12 @@ $api->any('/', function ($requst) { $headers[] = "Content-Type: application/text"; $headers[] = "Content-Transfer-Encoding: Binary"; $headers[] = "Content-Length:".filesize($attachment_location); - $headers[] = "Content-Disposition: attachment; filename={$filename}"; - die(); + $headers[] = "Content-Disposition: attachment; filename={$file_contents}"; + // die(); } else { - die("Error: File not found."); + // die("Error: File not found."); } - return new Response(200, $headers, readfile($attachment_location)); + return new Response(200, $headers, $file_contents); }); $api->get('/hello/{name}', function ($requst, $name) {