With Inertia.js when downloading a file, the file (.jpg) opens in browser showing random characters. Is there a way to force download the file?

Viewed 20

The download code currently is as simply as:

return Storage::download($request->file_path, $request->file_original_name);

But this only opens a screen with seemingly random characters. How can I force the browser from Inertia to save the file on the client machine without opening in the browser?

0 Answers
Related