FileUpload

Hello everyone, I feel really stupid but I cannot figure it out. If I use FileUpload and want to store photos to custom directory what should I do? I always find the file inside livewire-tmp folder but thats it. ->disk('public') does nothing and $this->photo->store() return exception, that I am trying to call method on array. Thanks for advice. protected function getFormSchema(): array { return [ FileUpload::make('employee_photo') ->preserveFilenames()->disableLabel(), ]; }
3 Replies
Dennis Koch
Dennis Koch2y ago
For adding a use ->directory(). But seems like you are not saving your form?
Dan Harrin
Dan Harrin2y ago
are you using $this->form->getState() like the docs tell you to?
TomášZ
TomášZOP2y ago
I am now and its working 🙂 Thank you guys.
Want results from more Discord servers?
Add your server