📜  存储为真实文件名 laravel uplaod - PHP 代码示例

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

代码示例1
if ($request->hasFile('image')) {
    $file_path = $request->file('image')->storeAs('dir_name', request()->file('image')->getClientOriginalName(), 'optional_disk_name');
}

// pass the disk name as the third argument to the storeAs method: ex. local,s3,etc