作者 lyh

gx

@@ -5,7 +5,6 @@ namespace App\Http\Controllers\File; @@ -5,7 +5,6 @@ namespace App\Http\Controllers\File;
5 use App\Enums\Common\Code; 5 use App\Enums\Common\Code;
6 use App\Http\Controllers\Controller; 6 use App\Http\Controllers\Controller;
7 use App\Http\Controllers\type; 7 use App\Http\Controllers\type;
8 -use App\Models\File\File;  
9 use App\Models\File\Image as ImageModel; 8 use App\Models\File\Image as ImageModel;
10 use App\Models\Project\Project; 9 use App\Models\Project\Project;
11 use App\Services\CosService; 10 use App\Services\CosService;
@@ -13,7 +12,6 @@ use App\Services\TencentCosService; @@ -13,7 +12,6 @@ use App\Services\TencentCosService;
13 use Illuminate\Http\Exceptions\HttpResponseException; 12 use Illuminate\Http\Exceptions\HttpResponseException;
14 use Illuminate\Http\JsonResponse; 13 use Illuminate\Http\JsonResponse;
15 use Illuminate\Support\Facades\Cache; 14 use Illuminate\Support\Facades\Cache;
16 -use Illuminate\Support\Facades\Storage;  
17 use Intervention\Image\Facades\Image; 15 use Intervention\Image\Facades\Image;
18 16
19 class ImageController extends Controller 17 class ImageController extends Controller
@@ -259,7 +257,7 @@ class ImageController extends Controller @@ -259,7 +257,7 @@ class ImageController extends Controller
259 * @time :2023/7/19 17:59 257 * @time :2023/7/19 17:59
260 */ 258 */
261 public function download(){ 259 public function download(){
262 - $imageModel = new Image(); 260 + $imageModel = new ImageModel();
263 $info = $imageModel->read(['hash' => $this->param['hash']]); 261 $info = $imageModel->read(['hash' => $this->param['hash']]);
264 if ($info === false) { 262 if ($info === false) {
265 $this->response('指定文件不存在!', Code::USER_ERROR); 263 $this->response('指定文件不存在!', Code::USER_ERROR);