Media library uploads the file to a digital ocean s3 bucket, but does not save to the database

Hello, I'm trying to upload an image to S3, the image uploads but it does not associate or insert into the database, I have something like: SpatieMediaLibraryFileUpload::make('pdfs') ->label('documents pdfs') ->collection('media') I also have the model arranged as it is in the documentation.
2 Replies
Sjoerd24
Sjoerd243mo ago
Lot of things could go wrong here. Your media table is empty? Did you adjusted your model correctly? (Interactswithmedia etc?)
juanklagos
juanklagos3mo ago
my model has the configuration: class Module extends Model implements HasMedia { protected $connection = 'mysql'; use InteractsWithMedia; In config livewire assign the disk "do" (digital ocean), it uploads the images to the bucket well, the only thing it does not do is associate it with the model in the table media