Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #store #real #file #laravel #uplaod
ADD COMMENT
Topic
Name
7+6 =