SpatieMediaLibrary not uploading files Livewire Component?
Using The interacts with media on the model, and then in the form component we have the standard type of save:
Looking at the network requests we are having files uploaded to upload-file?expires=3423232342332
any suggestions? Using S3 no errors, not logs. Just no files saved, used to work in V2.
8 Replies
bumppp
did you publish livewire config?
There's one published from v2, why so?
Noting spatie file uploads work in a filament resource
I guess it is different on livewire v3... You could try to publish it again
Thanks for the hint, I'll have a further play.
They are uploaded as per Livewire v3 to the livewire-tmp dir. So it's something other than that, its how Spatie is handling the save method I suspect. I'll review the Forms V3 docs to see if something changed
hum..
Got it!
Applied the model to the form initation instance, then also after create, ->saveRelationships.
Just re-read the docs and relationships etc.
Solution
Double tested, just needed the saveRelationships method added post create.