mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Fix the download for music on hold so it will show the file name as expected.
This commit is contained in:
@@ -71,7 +71,6 @@ if ($_GET['a'] == "download") {
|
|||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Type: application/download");
|
header("Content-Type: application/download");
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header('Content-Disposition: attachment; file_name="'.base64_decode($_GET['file_name']).'"');
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$file_ext = substr(base64_decode($_GET['file_name']), -3);
|
$file_ext = substr(base64_decode($_GET['file_name']), -3);
|
||||||
@@ -82,6 +81,7 @@ if ($_GET['a'] == "download") {
|
|||||||
header("Content-Type: audio/mp3");
|
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("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
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'])));
|
header("Content-Length: " . filesize($music_on_hold_dir."/".$path_mod.$sampling_rate_dir."/".base64_decode($_GET['file_name'])));
|
||||||
|
|||||||
@@ -60,7 +60,6 @@ require_once "resources/paging.php";
|
|||||||
header("Content-Type: application/octet-stream");
|
header("Content-Type: application/octet-stream");
|
||||||
header("Content-Type: application/download");
|
header("Content-Type: application/download");
|
||||||
header("Content-Description: File Transfer");
|
header("Content-Description: File Transfer");
|
||||||
header('Content-Disposition: attachment; filename="'.base64_decode($_GET['filename']).'"');
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$file_ext = substr(base64_decode($_GET['filename']), -3);
|
$file_ext = substr(base64_decode($_GET['filename']), -3);
|
||||||
@@ -71,6 +70,7 @@ require_once "resources/paging.php";
|
|||||||
header("Content-Type: audio/mp3");
|
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("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
|
||||||
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
|
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'])));
|
header("Content-Length: " . filesize($_SESSION['switch']['recordings']['dir'].'/'.base64_decode($_GET['filename'])));
|
||||||
|
|||||||
Reference in New Issue
Block a user