I’m loading multiple images and sometimes it works fine and another hangs, other times it doesn’t take certain images and redirects me to page 404. I would like if you can give me a hand. I appreciate very much any intention.
I am using Livewire as follows:
<input wire:model="imagenes" type="file" name="imagenes" class="form-control-file" multiple>
Once the images are selected, it goes through the validator:
$this->validate([
'imagenes.*' => 'image|max:2048',
]);
And to save the images I am using the following methodology
foreach ($this->imagenes as $pathGaleria) {
$imgUrl = $pathGaleria->store('imagenesPropiedades');
$img = imgPropiedades::create([
'url' => $imgUrl,
'property_id' => $this->propiedadId
]);
}
On the filesystem:
'imagenesPropiedades' => [
'driver' => 'local',
'root' => public_path(),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
],
I get this error in console
Can you give me a suggestion to improve this load please.