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
13 Replies
mar5hall
mar5hall5mo ago
Try storage:link —relative
EL REKT
EL REKT5mo ago
its not working, its return like this the [public/storage] link already exists
No description
Tieme
Tieme5mo 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 REKT5mo 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
mar5hall5mo ago
Ok. You understand that error? You need to delete old linked folders and then rerun command with relative prefix
EL REKT
EL REKT5mo 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
DianaMujoiu5mo ago
protected $proxies = '*'; try this in TrustProxies
EL REKT
EL REKT5mo ago
still the same, not working
TranceCode
TranceCode5mo 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 REKT5mo 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
TranceCode5mo ago
do you try with this ?
TranceCode
TranceCode5mo 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 REKT5mo 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...
Want results from more Discord servers?
Add your server
More Posts