small changes
This commit is contained in:
parent
6cec87eb14
commit
edff1e2d2d
8
api.php
8
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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user