Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

400 for each upload #30

Open
GankuShi opened this issue May 21, 2022 · 2 comments
Open

400 for each upload #30

GankuShi opened this issue May 21, 2022 · 2 comments

Comments

@GankuShi
Copy link

Hi, when trying to upload, no matter what file/size/origin it throws 400.

Config below,
bind = 192.168.0.131:3001 siteurl = https://192.168.0.131:3001/ cleanup-every-minutes = 120 allowhotlink = true filespath = files/ metapath = meta/ selifpath = f remoteuploads = true

Using version 2.3.8

@unisn-g
Copy link

unisn-g commented Nov 5, 2022

I was able to solve this by changing siteurl = https://mylinx.example.org/ to siteurl = http://10.8.0.1:8080. Not sure if this helps, because the only difference is I'm not using https (and the trailing '/'), which might be a deal breaker for you. Might help you to debug tho.
Edit: I think it has something to do with the url to the file. If the url is somehow invalid, it doesn't know where to place the file.

@m-primo
Copy link

m-primo commented Jul 6, 2024

I'm getting this issue whenever I run the instance behind a reverse proxy.
The only solution that seemed to work is what @unisn-g said.

I set siteurl to the same url I'm uploading from, for example if you're running the instance behind a reverse proxy on some url or some vpn or whatever, let's say example.com or 10.8.0.1 with port 8080, you have to set it to http://example.com:8080/ or http://10.8.0.1:8080/, and so on. This is really bad and it's not the expected behavior at all, as the documentation itself says for the siteurl`:

default is inferred from execution context

So, the expected behavior when we not set the siteurl it should be whatever "host" is running it on.

Another thing, it shows 400 in the network tab without any error the only response is literally {"error": ""}, and nothing even shows in the UI, you have to open the network tab to see what's really going on after uploading. And same for the logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants