Uploading File Gives [Method Not Allowed] error when uploaded via filepond
I am getting the following error when try to upload files via Filament.
I am working on it locally at the moment. I am using Laravel 11.x with Laragon. Serving from public folder. I am not using
File upload code:
The GET method is not supported when for route Livewire/upload-file.The GET method is not supported when for route Livewire/upload-file.I am working on it locally at the moment. I am using Laravel 11.x with Laragon. Serving from public folder. I am not using
php artisan serve to servephp artisan serve to serve app.File upload code:
# images
Forms\Components\FileUpload::make('images')
->label('Upload images of the recipe')
->helperText('Drag & drop multiple images at once')
// ->disk('public')
// ->visibility('public')
->reactive()
->acceptedFileTypes(['image/*'])
->multiple()
->maxSize(10240) # 10MB file limit
->maxFiles(5)
->minFiles(1)
->directory('recipe-images')
->saveRelationshipsUsing(function ($component, $state, $record) {
foreach ($state as $filePath) {
$record->images()->create([
'path' => $filePath
]);
}
})->columnSpanFull()
->required() # images
Forms\Components\FileUpload::make('images')
->label('Upload images of the recipe')
->helperText('Drag & drop multiple images at once')
// ->disk('public')
// ->visibility('public')
->reactive()
->acceptedFileTypes(['image/*'])
->multiple()
->maxSize(10240) # 10MB file limit
->maxFiles(5)
->minFiles(1)
->directory('recipe-images')
->saveRelationshipsUsing(function ($component, $state, $record) {
foreach ($state as $filePath) {
$record->images()->create([
'path' => $filePath
]);
}
})->columnSpanFull()
->required()
