Answers for "how to upload file in storage laravel 8 and change the filename"

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 storage save file folder on disk

Storage::disk('public')->putFile('folder-destination', $request->file('file-to-save'));
Posted by: Guest on September-19-2021

Code answers related to "how to upload file in storage laravel 8 and change the filename"

Browse Popular Code Answers by Language