Back to blog

[Short] Filament File Upload Issues

January 23rd, 2026

I ran into a file upload issue on my testing environment which I had trouble figuring out. After prompting with Cursor for a while it found why it wasn't working for.

Breakdown

If you have a testing/staging environment make sure to not use APP_ENV=testing as it will interfere with Filament livewire's file upload capability as it will not generate s3 singed url's. See the code below that Cursor found.

SupportFileUploads.php

php
if (app()->runningUnitTests()) {    // Don't actually generate S3 signedUrls during testing.    GenerateSignedUploadUrlFacade::swap(new class extends GenerateSignedUploadUrl {        public function forS3($file, $visibility = '') { return []; }    });}

Fix

In order to get it working make sure your app environment isn't called testing but call it something like staging instead. It will save headaches and time figuring out what is going on.