Error while uploading the file

I try to upload files locally and it works fine, when I try to upload it on production I get this error response with an empty message:
11 Replies
LeandroFerreira
php artisan storage:link did you config APP_URL in the .env file?
YoussefMaged
YoussefMagedOP2y ago
Yes I will try that and tell you Thank you Leandro
YoussefMaged
YoussefMagedOP2y ago
This is the output, I did php artisan storage:link php artisan tenants:run storage:link and this was the output and it's still failing, I suspect it's storage write permissions on my server but I'm not sure where should I touch
YoussefMaged
YoussefMagedOP2y ago
LeandroFerreira
in app/Http/Middleware/TrustProxies.php set this protected $proxies = '*';
YoussefMaged
YoussefMagedOP2y ago
I did so and I'm still getting the same error
Abdur Razzaque
Maybe your directory is not correct
YoussefMaged
YoussefMagedOP2y ago
I'm trying to fetch the directory it tries to go to through the request but with no success, maybe I'm missing something?
Abdur Razzaque
Yap! Can you share the way of your uploading process?
YoussefMaged
YoussefMagedOP2y ago
That's from a spatie laravel settings filament page
protected function getFormSchema(): array
{
return [
Card::make()
->schema([
FileUpload::make('app_logo_url')
->label(__('ch-system.page_settings.app_logo_url'))
->preserveFilenames()
->image(),
Select::make('confession_father_role_id')
->label(__('ch-system.page_settings.confession_father_role_name'))
->options(Role::all()->pluck('name', 'id'))
->searchable(),
])
->inlineLabel(),
];
}
protected function getFormSchema(): array
{
return [
Card::make()
->schema([
FileUpload::make('app_logo_url')
->label(__('ch-system.page_settings.app_logo_url'))
->preserveFilenames()
->image(),
Select::make('confession_father_role_id')
->label(__('ch-system.page_settings.confession_father_role_name'))
->options(Role::all()->pluck('name', 'id'))
->searchable(),
])
->inlineLabel(),
];
}
Most probably because I'm uploading from a different domain name which is a tenant and the APP_URL is set to the central version of the app? But I need this functionality so how to avoid that 401 signature validation?

Did you find this page helpful?