📜  将图像存储到 s3 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:25.158000             🧑  作者: Mango

代码示例1
// Products controller
use Illuminate\Support\Facades\Storage;

$image = $request->file('image');
$filePath = 'images/' . $image->getClientOriginalName();
Storage::disk('s3')->put($filePath, file_get_contents($image), 'public');