作者 张关杰

Merge branch 'develop' of http://47.244.231.31:8099/zhl/globalso-v6 into develop

... ... @@ -82,7 +82,9 @@ class FileController
}
$size = $info['size'];
// 设置Content-Type头部
if($info['type'] == 'mp4'){
$header['Content-Type'] = 'video/' . $info['type'];
}
// 设置Accept-Ranges头部
$header['Accept-Ranges'] = 'bytes';
// 检查是否有范围请求
... ... @@ -285,9 +287,9 @@ class FileController
* @method :post
* @time :2023/6/26 16:28
*/
public function downLoad($hash){
public function downLoad(){
$file_model = new File();
$info = $file_model->read(['hash' => $hash]);
$info = $file_model->read(['hash' => $this->param['hash']]);
if ($info === false) {
$this->response('指定文件不存在!', Code::USER_ERROR);
}
... ...
... ... @@ -221,6 +221,7 @@ Route::middleware(['bloginauth'])->group(function () {
Route::prefix('files')->group(function () {
Route::post('/upload', [\App\Http\Controllers\File\FileController::class, 'upload'])->name('files_upload');
Route::any('/getFileList', [\App\Http\Controllers\File\FileController::class, 'getFileList'])->name('files_getFileList');
Route::any('/downLoad', [\App\Http\Controllers\File\FileController::class, 'downLoad'])->name('files_downLoad');
});
//精准询盘
Route::prefix('inquiry')->group(function () {
... ...