FilamentF
Filament16mo ago
AlokDev

I am unable to upload images after deploying Filament Admin panel on server

I’ve deployed my Laravel app on a DigitalOcean server, but I’ve had to use a slightly different folder structure for the public and other Laravel files:

Public files: https://example.com/html/my-project/my-first-filament-app/
Laravel app files: https://example.com/laravel/my-project/

My web URL is: https://example.com/my-first-filament-app/. I’ve updated the public path and app bindings to reflect this structure, and everything works fine so far.
I’ve also set custom routes for Livewire as it was throwing a 404 due to the structure:
 Livewire::setUpdateRoute(function ($handle) {
  return Route::post('/my-first-filament-app/livewire/update', $handle);
});

Livewire::setScriptRoute(function ($handle) {
  return Route::get('/my-first-filament-app/livewire/livewire.js', $handle);
});

These changes have resolved my issues with Livewire, but now I’m encountering an “Unauthorized” error when trying to upload images via the Filament panel. The issue occurs on the /livewire/upload-file endpoint.
image.png
image.png
Was this page helpful?