vendredi 2 octobre 2020

Laravel - Configure storage in a different directory where is the project

I have a project located in this path /var/www/html/backend/api_cars

I have a storage configured to hang certain files in the "public" folder, but now I would need to upload files (for this I use dropzone js), with the particularity that when they are uploaded must be copied to a directory that is not within the project,

Its path is /var/www/html/images/catalog/cars

My question is how can I do it with laravel, I have tried to configure a "storage" of type "folder" but it gives me an error.

In the file config/filesystems.php I have created this

   'public' => [
    'driver' => 'images-cars',
    'root' => storage_path('/var/www/html/images/catalog/cars'),
    'url' => env('APP_URL').'/catalog-cars',
    'visibility' => 'public',
],

It had occurred o create a "Symbolic link" within a project folder to the other folder, but I don't know if it would work.

Thanks in advance.



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/36EEAmf
via IFTTT

Aucun commentaire:

Enregistrer un commentaire