Assistance Required with File Uploads in FilamentPHP Admin Panel

filmenphp Package Version ^3.2 How can we help you? laravel 11.9 , php 8.3 , livewire 3.5 I am encountering an issue with file uploads in the FilamentPHP Admin Panel. Whenever I try to add a file, such as an image or a video, I receive a "401 Unauthorized" error, but this only occurs in the production environment. I've tried various solutions I found on Google, but unfortunately, none of them have worked, including changes to some Nginx configurations and other adjustments. Could you please help me resolve this issue? Thank you!
No description
No description
3 Replies
ChesterS
ChesterS3mo ago
What have you tried so far? Did you check permissions, ran artisan storage:link etc?
Wiseman99
Wiseman99OP3mo ago
@ChesterS Hi! I’ve tried a few things to resolve the issue, but unfortunately, I'm still facing problems. Here's what I’ve done so far: Permissions: I ran chmod 455 storage to check the permissions, and everything seems fine there. Artisan Commands: I also ran php artisan storage:link, and that initially worked, but now it seems to have reverted. Session Driver: I changed the session driver from 'file' to 'database' and also tried 'array', but that didn’t solve the issue. PHP Configuration: In php.ini, I adjusted the max_upload_files, post_max_size, and memory_limit, but there hasn't been any improvement. it is only in production !!!! Despite all these efforts, I'm still having trouble. If you have any more suggestions or insights, I would greatly appreciate your help! @ChesterS It worked perfectly for two months, but now I'm facing this issue without making any changes. I'm not sure why it's suddenly happening.
ChesterS
ChesterS3mo ago
Artisan Commands: I also ran php artisan storage:link, and that initially worked, but now it seems to have reverted.
Did this stop randomly or after a new deployment? You might have to run it every time you deploy if that's the case. Is there anything in the logs? A 401 could be a number of things. Might be an issue with the signature validation, it could be trying to write to a folder that exists in you local machine but not in production etc. similar issues here : https://stackoverflow.com/questions/78855434/why-am-i-getting-401-errors-on-livewire-uploads https://stackoverflow.com/questions/75158237/livewire-withfileupload-401-with-urls-not-matching-so-failing-signature-check (linking it just in case any applies to you)
Want results from more Discord servers?
Add your server