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 20fbca15d0
commit fcc40cd91d
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,6 @@ if ($_GET['a'] == "download") {
header("Content-Type: application/octet-stream");
header("Content-Type: application/download");
header("Content-Description: File Transfer");
header('Content-Disposition: attachment; file_name="'.base64_decode($_GET['file_name']).'"');
}
else {
$file_ext = substr(base64_decode($_GET['file_name']), -3);
@@ -82,6 +81,7 @@ if ($_GET['a'] == "download") {
header("Content-Type: audio/mp3");
}
}
header('Content-Disposition: attachment; filename="'.base64_decode($_GET['file_name']).'"');
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($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name'])));

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'])));