I am triying to upload a document with the Storage disk method. I can upload him in this the /storage/app/public .But now I want to allow the user to dowload into his computer. So that is my App Url in the .env
APP_URL=http://backend-debug.localhost
In the filesystems.php I create a new link "import"
'import' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage/app/public',
'visibility' => 'public',
],
finally I return him with
$response['url'] = Storage::disk('import')->url('export-error/'.$filename);
Log::info('url = '.$response['url'] );
return $response;
The log gives this information.
url = http://backend-debug.localhost/storage/app/public/export-error/error_file.csv
I am using Laravel 5.6
I can't dowload my Document into my pc
Any idea ?
Thank you
env(APP_URL)
withpublic_path()
– AntonyMNstorage/app/public/export-error/error_file.csv
? – Vaibhavraj Roham