F
Filament11mo ago
EL REKT

The server responded with a status of 401 (Unauthorized) when upload image/file

In local development this runs smoothly, but when I deploy to the server an error like this occurs when uploading files/images, can anyone help? btw, I've run the storage:link command on the server
No description
16 Replies
mar5hall
mar5hall11mo ago
Try storage:link —relative
EL REKT
EL REKTOP11mo ago
its not working, its return like this the [public/storage] link already exists
No description
Tieme
Tieme11mo ago
Have you search and read al the question about this? Because this "question" has been asked a lot, please use search and try to solve the question with a already provided answer. If it works local, but not on deployment server. Than most of the time it is something with the deployment server, somthing like permission. And please also tell what have you done already to solve this?
EL REKT
EL REKTOP11mo ago
I've read all the questions with the keyword deployment', but haven't gotten the right answer. I have run several commands like storage:link, storage:link --relative, chmod 775, chmod 777`, but it still doesn't work. So I created a new question regarding this.
mar5hall
mar5hall11mo ago
Ok. You understand that error? You need to delete old linked folders and then rerun command with relative prefix
EL REKT
EL REKTOP11mo ago
ok, let me try first, thanks for answering. this still doesn't work.. these are the steps I have taken: 1. rm -rf public/storage 2. install the symfony/filesystem package 3. storage:link --relative
DianaMujoiu
DianaMujoiu11mo ago
protected $proxies = '*'; try this in TrustProxies
EL REKT
EL REKTOP11mo ago
still the same, not working
TranceCode
TranceCode11mo ago
Nooo, no bro, never use a chmod 777, It's the biggest security breach you can make. just use 755 please
EL REKT
EL REKTOP11mo ago
haha, this is still deploying to the server for user testing, because I'm frustrated what's wrong with this error... thanks for the advice, I won't do that again.
TranceCode
TranceCode11mo ago
do you try with this ?
TranceCode
TranceCode11mo ago
Filament
Why are my file previews not loading? by Dan Harrin - Filament
A collection of beautiful full-stack components for Laravel. The perfect starting point for your next app. Using Livewire, Alpine.js and Tailwind CSS.
EL REKT
EL REKTOP11mo ago
yes I have tried it, now I will try by following the discussion at this link: https://github.com/livewire/livewire/discussions/3084
GitHub
File upload over https fails signature verification · livewire live...
Fille uploads doesn't work over https, whereas it works perfectly over http Set up livewire file upload, then use https (e.g. with ngrok) the upload fails with the request to Request URL: https...
amuhshi
amuhshi6mo ago
have you found the answer?
awcodes
awcodes6mo ago
The problem isn’t your storage. It’s the livewire-tmp directory on your server. It doesn’t have the right permission to upload the file. Are you on shared hosting? Or your server doesn’t have the right permissions to create the livewire-tmp directory if it doesn’t exist. But the signature token is a smell too. Is the FileUpload field using visibilty(‘private’) and does it need to be private? This is definitely a serve issue though and unrelated to filament or laravel.
amuhshi
amuhshi6mo ago
so conclusion is filament can't upload image/file in shared hosting? is it right? or do any of you have any advice what should i do or asked to hosting developer so that i can upload the image?

Did you find this page helpful?