I upload the files using the following commands in this path (app/files/myfile.*)
$file = $request->file;
$filename = $file->store('files');
The name of files are hashed and properly stored in the path that I said. Now I want to send the download link for these files to the browser.
$file_name = "yPpRejYz5fwhVQ9j67Ns1b5vrSR6CokncZYH4hAa.zip";
return response()->download(storage_path('app/files/' . $file_name));
But the output is displayed as shown below.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire