filamentphp / filament

A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
https://filamentphp.com
MIT License
17.65k stars 2.76k forks source link

Forms\Components\FileUpload not uploading on disk #5791

Closed andreacivita closed 1 year ago

andreacivita commented 1 year ago

Package

filament/filament

Package Version

v2.17.3

Laravel Version

v10

Livewire Version

No response

PHP Version

8.2

Problem description

I have been attempting to upload a file on s3 disk using the Forms\Components\FileUpload feature. However, the file does not seem to be stored on disk even though the upload appears to be successful.

Expected behavior

I'm expecting to find image on s3 disk

Steps to reproduce

Forms\Components\FileUpload::make('image')
                                    ->disk('s3')
                                    ->visibility('private')
                                    ->directory('tmp')
github-actions[bot] commented 1 year ago

Hey @andreacivita! We're sorry to hear that you've hit this issue. 💛

However, it looks like you forgot to fill in the reproduction repository URL. Can you edit your original post and then we'll look at your issue?

We need a public GitHub repository which contains a Laravel app with the minimal amount of Filament code to reproduce the problem. Please do not link to your actual project, what we need instead is a minimal reproduction in a fresh project without any unnecessary code. This means it doesn't matter if your real project is private / confidential, since we want a link to a separate, isolated reproduction. That would allow us to download it and review your bug much easier, so it can be fixed quicker. Please make sure to include a database seeder with everything we need to set the app up quickly.

danharrin commented 1 year ago

Read the comment above, and also we can't debug issues in your local environment. This is more of a support request instead of a bug report.

ulasoft commented 1 year ago

Hi! @andreacivita found solutions I have the same error! If you found it, you can share it?

jbardnz commented 1 year ago

Ran into this issue myself and found the issue. If you set the visibility to public, but your S3 bucket doesn't allow public files it will just silently fail. This is also happening in Filament V3.

giagara commented 6 months ago

@jbardnz can you elaborate it please?

lpeterke commented 1 month ago

I am also having this issue. It seems like visibility('public') is the internal default with Filament, which will silently fail, because it doesnt seem to align with the default settings for a fresh S3 bucket.

adding visibility('private') to my code fixed the problem.