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 Koch15mo ago
For adding a use ->directory(). But seems like you are not saving your form?
Dan Harrin
Dan Harrin15mo ago
are you using $this->form->getState() like the docs tell you to?
TomášZ
TomášZ15mo ago
I am now and its working 🙂 Thank you guys.