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