BasherDesigns
the attachment field must be a file of type:
CSV is exported from a web app. I also have a Image uploader using SpatieMediaLibraryUpload that does the exact same thing, I select images, they upload to tmp dir and when hit Submit, same file type error reporting its not image
8 replies
the attachment field must be a file of type:
Update, this import is using FileUpload, but I do receive the same error with Spatie. Here is the code for the import Reservations```
Actions\Action::make('ImportReservations')
->label('Import Reservations')
->color('warning')
->icon('heroicon-o-arrow-up-on-square')
->form([
FileUpload::make('attachment')
->acceptedFileTypes(['text/csv']),
])
->action(function (array $data) {
$file = public_path('storage/'. $data['attachment']);
// dd($file);
$this->importCsv($file);
Notification::make()
->title('Reservations Imported')
->success()
->send();
}),
8 replies
Spatie Media Library temporary upload location?
Thats what I was thinking until I see Filament saving the image to the temp directory.. and the first time testing it created the livewire-tmp directory in the r2 bucket. I'm missing something here..
9 replies
Spatie Media Library temporary upload location?
I'm using Cloudflare R2, so I changed the 'disk' to my r2 disk, and I can see the temporary file now on Cloudflare bucket, when I hit save, it says Saved but the media table is not updated with the new image. I can successfully edit/create new records but media table isn't being updated with new record.
9 replies