fole upload

This commit is contained in:
CHIEFSOFT\ameye
2024-05-26 14:30:21 -04:00
parent 28f2706be3
commit 915ef6f203
+4 -10
View File
@@ -48,6 +48,7 @@ class WrenchMedia extends BaseController
$call_backend = false;
$uriSegments = explode("/", parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
$segLen = count($uriSegments);
$micro_service_net1 = $this->getSiteConfigurations("system.micro_service_net1"); //"10.10.10.120";
if ( $segLen < 4 ){
return;
@@ -212,16 +213,9 @@ class WrenchMedia extends BaseController
default:
}
switch( $file_extension ) {
case "mp4":
header('Content-Description: File Transfer');
//header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($selectedFile).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
break;
default:
if( $file_extension ) {
$local_url = "http://".$micro_service_net1.":3036/myfile/".$out["flie_uid"];
return ["aaaa"=>$local_url];
}
header('Content-type: ' . $ctype);
readfile($selectedFile);