Browse Source

- server-files: fix download file size

master
vanhofen 4 years ago
parent
commit
aab2015469
  1. 9
      .server-files/get-image.php
  2. 9
      .server-files/get-kernel.php

9
.server-files/get-image.php

@ -101,8 +101,13 @@ if (empty($last_image))
else
{
# send image
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$last_image\"");
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($last_image) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($last_image));
readfile($last_image);
}
?>

9
.server-files/get-kernel.php

@ -52,8 +52,13 @@ if (!file_exists($kernel))
else
{
# send kernel
header("Content-Type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"$kernel\"");
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($kernel) . '"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($kernel));
readfile($kernel);
}
?>
Loading…
Cancel
Save