Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Zuby's avatar
Level 2

File not downloading on production server but works on local server

I'm saving the file like this

$file->storeAs('patients', $storageFilename);

I'm downloading it like this

return Storage::download('patients/'.$storageFilename, $name, ['Content-Type' => 'application/pdf']);

I'm deleting like this if (Storage::exists('patients/'.$storageFilename)){ Storage::delete('patients/'.$storageFilename); return $patientsFile->destroy($patientsFile->id); }

now it all works well on my local server but in production, storing the file works, deleting seems to work as well but download returns a is currently unable to handle this request. HTTP ERROR 503.

Pls any hints?

0 likes
0 replies

Please or to participate in this conversation.