Fileupload bug, images stuck on livewire-tmp

Below is a basic FileUpload form for an image that uses s3 storage. I tried using both Amazon s3 and DO s3 but the problem seems persistent specially when uploading multiple files. The images remained stuck in livewire-tmp folder and not moved. Sometimes all are properly uploaded to img folder but most of the time there are missing upload like 1 to 15 images missing. I searched all over for a fix and found others have the same issue as well with the fileupload. Here's my basic fileupload that accepts maximum of 50 images
FileUpload::make('images')
->multiple()
->image()
->maxFiles(50)
->maxParallelUploads(1)
->previewable(false)
->disk('s3')
->directory('img')
->visibility('public')
->moveFiles(),
FileUpload::make('images')
->multiple()
->image()
->maxFiles(50)
->maxParallelUploads(1)
->previewable(false)
->disk('s3')
->directory('img')
->visibility('public')
->moveFiles(),
And here's the model that accepts json array of images.
protected $casts = [
'vote_date' => 'date',
'upload_date' => 'datetime',
'images' => 'array',
];
protected $casts = [
'vote_date' => 'date',
'upload_date' => 'datetime',
'images' => 'array',
];
4 Replies
Dennis Koch
Dennis Koch5d ago
Can you share the submit()/save() method? ´ It uses $this->form->getState()?
r3venant
r3venantOP5d ago
i didn't explicitly defined that on my form.
Dennis Koch
Dennis Koch5d ago
You need that method. It get's the values and also is responsible for moving the files
r3venant
r3venantOP5d ago
Ok I see I will check again the documentation . Thank you

Did you find this page helpful?