© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•9mo ago•
3 replies
kagchi

Unable to receive the s3 path url via file upload live

FileUpload::make('file')
->label('File Upload')
->visible(fn() => $question?->type === QuestionTypeEnum::SINGLE_FILE_UPLOAD->value)
->live()
->disk('s3')
->afterStateUpdated(function (
$record,
$state,
FileUpload $component,
$livewire
) {
\Log::info('File upload state:', ['state' => $state]);

return $this->handleFileUploadAnswer($state);
})
->directory(function () use ($periodId, $subjectId, $instituteId) {
return "{$instituteId}/{$periodId}/{$subjectId}/subject-tasks/questions/files";
})
->acceptedFileTypes(FileTypeEnum::from($question->file_mime)->mimeTypes())
->maxSize($question->file_size * 1024 * 1024)
->required(fn() => $question?->type === QuestionTypeEnum::SINGLE_FILE_UPLOAD->value)
->columnSpanFull(),

this should be return the uploaded to s3 link. but it instead returning tmp path.

[2025-06-06 21:12:45] local.INFO: File upload state: {"state":{"Livewire\Features\SupportFileUploads\TemporaryUploadedFile":"C:\Users\KagChi\AppData\Local\Temp\phpCE92.tmp"}}
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

File upload with s3
FilamentFFilament / ❓┊help
3y ago
Problems to upload file to S3
FilamentFFilament / ❓┊help
2y ago
Unable to upload a file on a live server
FilamentFFilament / ❓┊help
2y ago
File upload file from external file url
FilamentFFilament / ❓┊help
2y ago