hemu13's avatar

Change file upload path

Here i have mentioned my code

'disks' => [

    'local' => [
        'driver' => 'local',
        'root' => storage_path('app'),
    ],

    'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'visibility' => 'public',
    ],

How to change file upload path public/uploads to storage/app/public/uploads

Advance in thanks

0 likes
2 replies
Snapey's avatar

Laravel does not have a 'file upload path' you have to decide where to put the file. In your case it sounds like you want to put the file on the public disk.

This is the second parameter in the store command or third parameter in storeAs

https://laravel.com/docs/master/requests#storing-uploaded-files

eg

$path = $request->photo->storeAs('images', 'filename.jpg', 'public');

Please or to participate in this conversation.