2025-06-17 09:46:57 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
|
|
use App\Service\ImageService;
|
|
|
|
|
|
|
|
|
|
class ImageController extends Controller
|
|
|
|
|
{
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
public function upload()
|
|
|
|
|
{
|
|
|
|
|
// 获取post的image参数
|
|
|
|
|
$image = request()->file('image');
|
2025-06-17 14:50:28 +08:00
|
|
|
$pid = request()->file('pid');
|
2025-06-17 09:46:57 +08:00
|
|
|
|
2025-06-17 15:08:49 +08:00
|
|
|
return $image;
|
2025-06-17 14:50:28 +08:00
|
|
|
return new ImageService()->processImage($image, $pid);
|
2025-06-17 09:46:57 +08:00
|
|
|
}
|
|
|
|
|
}
|