1
votes

here my code :

Storage::disk('public')->putFileAs('/img/uploads/specialties', new File($validatedData['image_file']);

My system config file :

'public' => [
        'driver' => 'local',
        'root' => storage_path('app/public'),
        'url' => env('APP_URL').'/storage',
        'visibility' => 'public',
    ],

In local mode, when i upload an image, they are going into

/public/storage/img/uploads/specialties

but in production they are going to

/storage/app/public/img/uploads/specialties

What i tried : $ php artisan storage:link without success.

Anyone know how to change where uploaded files going in production ?

Thanks !

1

1 Answers

0
votes

I finally found a solution :

'public' => [
            'driver' => 'local',
            'root' => public_path('storage'),
            'url' => env('APP_URL').'/storage',
            'visibility' => 'public',
        ],