SpatieFileUpload data not getting with getState()

I have custom page in filament
use Filament\Pages\Page;
class CareerApplyJob extends Page
use Filament\Pages\Page;
class CareerApplyJob extends Page
and file upload field
Forms\Components\SpatieMediaLibraryFileUpload::make('personal_photo')
->preserveFilenames()
->label('Personal photo')
->collection('personal_photo')
->visibility('publico')
->disk(config('filesystems.default'))
->openable()
->previewable()
->acceptedFileTypes([
'image/jpeg',
'image/png',
])
->maxSize(2048)
->required()
Forms\Components\SpatieMediaLibraryFileUpload::make('personal_photo')
->preserveFilenames()
->label('Personal photo')
->collection('personal_photo')
->visibility('publico')
->disk(config('filesystems.default'))
->openable()
->previewable()
->acceptedFileTypes([
'image/jpeg',
'image/png',
])
->maxSize(2048)
->required()
when getting the dd($this->form->getState()); the data of files not comming
2 Replies
sezohussien
sezohussien3mo ago
Although when dd($this->form);
Filament\Forms\Form {#2906 ▼ // app/Livewire/CareerApplyJob.php:89
#evaluationIdentifier: "container"
#view: "filament-forms::component-container"
#defaultView: null
#viewData: []
#viewIdentifier: "container"
#livewire:
App\Livewire
\
CareerApplyJob {#2151 ▼
#__id: "EVgt8hed72dU1eQw3sBp"
#__name: "career-apply-job"
#listeners: []
#attributes:
Livewire\Features\SupportAttributes
\
AttributeCollection {#2746 ▶}
#model: "App\Models\JobCandidates"
+data: array:15 [▼
"attachment" => null
"FirstName" => "Astra"
"LastName" => "Edwards"
"Email" => "[email protected]"
"Country" => "Eveniet in id qui "
"City" => "Nisi enim doloremque"
"Street" => "Autem sint labore la"
"ZipCode" => "43744"
"State" => "Labore non ea ut qua"
"CurrentEmployer" => "Omnis nulla consequa"
"CurrentJobTitle" => "Ab quos ut voluptate"
"cover_letter" => "Sit dolorem accusam"
"experience" => "9year"
"attachments" => array:1 [▼
"b8efc3dd-0ecc-4467-986f-92cc59c0799a" =>
Livewire\Features\SupportFileUploads
\
TemporaryUploadedFile {#2154 ▶}
]
"personal_photo" => array:1 [▼
"c937fee8-4e25-4f3b-a444-bbf89f28cede" =>
Livewire\Features\SupportFileUploads
\
TemporaryUploadedFile {#2236 ▼
-test: false
-originalName: "sDIog2UO7o5u5Yszga7qTKjvwAoWxX-metad2FsbHBhcGVyZmxhcmUuY29tX3dhbGxwYXBlci5qcGc=-.jpg"
-mimeType: "application/octet-stream"
-error: 0
#hashName: null
#disk: "s3"
#storage:
Illuminate\Filesystem
\
AwsS3V3Adapter {#2658 ▼
#driver:
League\Flysystem
\
Filesystem {#2659 ▶}
#adapter:
League\Flysystem\AwsS3V3
\
AwsS3V3Adapter {#2653 ▶}

League\Flysystem
\
PathPrefixer {#2662 ▶}

Aws\S3
\
S3Client {#2158 ▶}
}
...
}
]
]
+captcha: ""
Filament\Forms\Form {#2906 ▼ // app/Livewire/CareerApplyJob.php:89
#evaluationIdentifier: "container"
#view: "filament-forms::component-container"
#defaultView: null
#viewData: []
#viewIdentifier: "container"
#livewire:
App\Livewire
\
CareerApplyJob {#2151 ▼
#__id: "EVgt8hed72dU1eQw3sBp"
#__name: "career-apply-job"
#listeners: []
#attributes:
Livewire\Features\SupportAttributes
\
AttributeCollection {#2746 ▶}
#model: "App\Models\JobCandidates"
+data: array:15 [▼
"attachment" => null
"FirstName" => "Astra"
"LastName" => "Edwards"
"Email" => "[email protected]"
"Country" => "Eveniet in id qui "
"City" => "Nisi enim doloremque"
"Street" => "Autem sint labore la"
"ZipCode" => "43744"
"State" => "Labore non ea ut qua"
"CurrentEmployer" => "Omnis nulla consequa"
"CurrentJobTitle" => "Ab quos ut voluptate"
"cover_letter" => "Sit dolorem accusam"
"experience" => "9year"
"attachments" => array:1 [▼
"b8efc3dd-0ecc-4467-986f-92cc59c0799a" =>
Livewire\Features\SupportFileUploads
\
TemporaryUploadedFile {#2154 ▶}
]
"personal_photo" => array:1 [▼
"c937fee8-4e25-4f3b-a444-bbf89f28cede" =>
Livewire\Features\SupportFileUploads
\
TemporaryUploadedFile {#2236 ▼
-test: false
-originalName: "sDIog2UO7o5u5Yszga7qTKjvwAoWxX-metad2FsbHBhcGVyZmxhcmUuY29tX3dhbGxwYXBlci5qcGc=-.jpg"
-mimeType: "application/octet-stream"
-error: 0
#hashName: null
#disk: "s3"
#storage:
Illuminate\Filesystem
\
AwsS3V3Adapter {#2658 ▼
#driver:
League\Flysystem
\
Filesystem {#2659 ▶}
#adapter:
League\Flysystem\AwsS3V3
\
AwsS3V3Adapter {#2653 ▶}

League\Flysystem
\
PathPrefixer {#2662 ▶}

Aws\S3
\
S3Client {#2158 ▶}
}
...
}
]
]
+captcha: ""
sezohussien
sezohussien3mo ago
GitHub
FileUpload file not saved in the specified final directory ->direct...
Package filament/filament Package Version v3.0.91 Laravel Version v10.30.1 Livewire Version v3.1.0 PHP Version PHP 8.2.0 Problem description Uploaded file is deleted in the folder "storage/app...
Want results from more Discord servers?
Add your server