📜  ->store() laravel 更改名称 - PHP 代码示例

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

代码示例1
public function saveFile(Request $request) {
    $md5Name = md5_file($request->file('your_input_name')->getRealPath());
    $guessExtension = $request->file('your_input_name')->guessExtension();
    $file = $request->file('your_input_name')->storeAs('your_path', $md5Name.'.'.$guessExtension  ,'your_disk');
}