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

iamlux20's avatar

FileUpload - Uploaded but gets 404'd

Hello, I am experiencing this in the production but not in local server. I have this FileUpload, it works "perfectly" fine except on this specific file.

(https://imgur.com/a/WmMyRMD)

All of them are uploaded successfully, I can see them on the server with the same file permissions and all are saved in the database column of the ID. However, the red highlight doesn't seem to be fetched nor downloaded. It gives me a 404 error whenever I try to view it and downloading it gives me "Couldn't download - no file" error in the browser.

Here's the FileUpload code:

FileUpload::make('supporting_documents')
    ->label('Supporting Documents')
    ->multiple()
    ->preserveFilenames()
    ->required()
    ->openable()
    ->downloadable()
    ->moveFiles()
    ->previewable(true)
    ->maxSize(10000)
    ->helperText('Accepts .pdf or image files up to 10MB only.')
    ->acceptedFileTypes(['application/pdf', 'image/*'])
    ->columnSpan(['sm' => 12, 'md' => 4, 'xl' => 4, '2xl' => 4]),
0 likes
2 replies
jlrdw's avatar

Is your project properly pointing to public as document root?

Are you using nginx or apache?

iamlux20's avatar

@jlrdw yes, and apache. All other uploaded files are uploaded/fetched/downloaded fine except for one.

Please or to participate in this conversation.