F
Filament8mo ago
Wannes

File Upload

Hi, my file upload is not working as expected. It's always using the local disk, while I specifically tell it to use public. It always saves files under app/storage/livewire-tmp Also, in the database I just get this back: {"86debad5-ef3a-4570-99e7-8be320a4e9b4":{}} Which is not good enough to re-retrieve the file and display it on the view form... Is anyone familar with file upload and storing the path (or something else) to the database, and have it permanently? I've also done php artisan storage:link
FileUpload::make('logo')
->label('Logo')
->acceptedFileTypes(['image/png', 'image/jpg', 'image/jpeg'])
->downloadable()
->maxSize(32000)
->disk('public')
->maxFiles(1)
->preserveFilenames()
->image()
->imageEditor()
->imageEditorAspectRatios([
'16:9',
'4:3',
'1:1',
]),
FileUpload::make('logo')
->label('Logo')
->acceptedFileTypes(['image/png', 'image/jpg', 'image/jpeg'])
->downloadable()
->maxSize(32000)
->disk('public')
->maxFiles(1)
->preserveFilenames()
->image()
->imageEditor()
->imageEditorAspectRatios([
'16:9',
'4:3',
'1:1',
]),
`
0 Replies
No replies yetBe the first to reply to this messageJoin