Fix the download for music on hold so it will show the file name as expected.

This commit is contained in:
Mark Crane
2013-11-04 18:47:10 +00:00
parent 6f9cf6a5c1
commit 9c58a898ab
2 changed files with 2 additions and 2 deletions

View File

@@ -60,7 +60,6 @@ require_once "resources/paging.php";
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header('Content-Disposition: attachment; filename="'.base64_decode($_GET['filename']).'"');
}
else {
$file_ext = substr(base64_decode($_GET['filename']), -3);
@@ -71,6 +70,7 @@ require_once "resources/paging.php";
header("Content-Type: audio/mp3");
}
}
header('Content-Disposition: attachment; filename="'.base64_decode($_GET['filename']).'"');
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Content-Length: " . filesize($_SESSION['switch']['recordings']['dir'].'/'.base64_decode($_GET['filename'])));