SpatieMediaFileUpload how to set value using another model already existing file

$set('nationaliy_proof', [$user->getFirstMedia('nationality_proof')]);
$set('nationaliy_proof', [$user->getFirstMedia('nationality_proof')]);
SpatieMediaLibraryFileUpload::make('nationality_proof')
->label('Nationality Proof Document (Aadhar/Voter ID)')
->collection('nationality_proof')
->previewable(false)
->openable()
->downloadable()
->maxFiles(1)
->columnSpanFull(),
SpatieMediaLibraryFileUpload::make('nationality_proof')
->label('Nationality Proof Document (Aadhar/Voter ID)')
->collection('nationality_proof')
->previewable(false)
->openable()
->downloadable()
->maxFiles(1)
->columnSpanFull(),
I have this in form , i want to set the current form media input from another model (User) media, does anyone know how to do this? i basically want to fill the Spatiemediafileupload input with the file from user model when they choose user
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?