|
...
|
...
|
@@ -75,6 +75,8 @@ class FileController |
|
|
|
if (!is_file($path)) {
|
|
|
|
$this->response('指定文件已被系统删除!', Code::USER_ERROR);
|
|
|
|
}
|
|
|
|
$size = $info['size'];
|
|
|
|
header("Content-Length: ".$size);
|
|
|
|
// 设置Content-Type头部
|
|
|
|
header("Content-Type: video/mp4");
|
|
|
|
// 发送完整文件
|
|
...
|
...
|
@@ -119,7 +121,7 @@ class FileController |
|
|
|
* @method :post
|
|
|
|
* @time :2023/6/17 16:32
|
|
|
|
*/
|
|
|
|
public function single($files,$size,$file_type){
|
|
|
|
public function single(&$files,$size,$file_type){
|
|
|
|
$hash = hash_file('md5', $files->getPathname());
|
|
|
|
//查看文件是否存在
|
|
|
|
$fileModel = new File();
|
...
|
...
|
|