Answers for "laravel upload file edit name"

PHP
0

store as real file name laravel uplaod

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
Posted by: Guest on May-04-2021
0

laravel download file change name

return Response::download($file, $document->originalname);
Posted by: Guest on November-02-2021

Browse Popular Code Answers by Language