© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
2 replies
Adam

Image Uploading & S3 with Previews

Currently, I am able to get my uploaded images saved on my S3 Instances, however, I've noticed a handful of issues that go against the documentation:

- Preserving filenames do not work.
- There is no way to preview images after they've been uploads.
- Images do not go to the desired bucket name (when specified).

Below is my code:

FileUpload::make('featured_images')
                    ->multiple() // Allows for multiple images
                    ->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp', 'image/tiff']) // Files types we'll accept
                    ->preserveFilenames() // Ensure we keep the original file names
                    ->disk('s3') // Save to our S3 Bucket
                    ->directory('items')
                    ->columnSpan(3),
FileUpload::make('featured_images')
                    ->multiple() // Allows for multiple images
                    ->acceptedFileTypes(['image/jpeg', 'image/png', 'image/webp', 'image/tiff']) // Files types we'll accept
                    ->preserveFilenames() // Ensure we keep the original file names
                    ->disk('s3') // Save to our S3 Bucket
                    ->directory('items')
                    ->columnSpan(3),


I've specified that i want to
preserveFilenames()
preserveFilenames()
and that I want to send uploaded items to the
items
items
bucket via
directory('items')
directory('items')


Any clarification on this would be greatly welcomed.
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

Getting 403 Forbidden when uploading S3 image
FilamentFFilament / ❓┊help
16mo ago
Uploading profile image
FilamentFFilament / ❓┊help
3y ago
Image previews not showing up
FilamentFFilament / ❓┊help
3y ago
file uploading to S3 on vapor stuck on uploading
FilamentFFilament / ❓┊help
2y ago