Can't upload file
dateno1 opened this issue · comments
kiwi&file uploader is lastest (Downloaded at today)
kiwi, file uploader - nginx (reverse proxy) - internet
kiwi&file uploader&nginx run on same server
If i disable CSP
Show another error
FileUploader.config.txt
File Uploader's config (domain replaced)
Kiwi.static.config.txt
kiwi static config (domain replaced)
nginx.conf.txt
nginx config (domain replaced)
make sure basePath and nginx configs all have trailing / eg /uploads/ you will also need to add the path to proxy_pass
example reverse proxy https://gist.github.com/ItsOnlyBinary/ae8d41c4542e66bb259b0f1b312c7d29
make sure basePath and nginx configs all have trailing / eg /uploads/ you will also need to add the path to proxy_pass
example reverse proxy https://gist.github.com/ItsOnlyBinary/ae8d41c4542e66bb259b0f1b312c7d29
I don't want to use nginx to httpd (it only for policy&tls)
I can use all function exclude file upload
Proxy setting is not Problem. It blocked by browser (not server)
All problem is from adress (http://127.0.0.1 from http://adress is not allowed)
looks like you also set config.json "fileuploader.server" to "http://127.0.0.1:8088/upload" that should be the externally accessible address like /upload/
or a FQDN like https://example.com/upload/
The cors error is a symptom of it not being able to connect not the real error
looks like you also set config.json "fileuploader.server" to "http://127.0.0.1:8088/upload" that should be the externally accessible address like
/upload/
or a FQDN likehttps://example.com/upload/
The cors error is a symptom of it not being able to connect not the real error
How can i change that?
I can't found 'fileuploader.server' in config.toml
I think that can fix problem
the server is defined in the kiwiirc's config.json it should be its external address 127.0.0.1 is an internal address
the server is defined in the kiwiirc's config.json it should be its external address 127.0.0.1 is an internal address
It mean kiwi - static - config.json?
Already FileUploader's server is used external domain address
But it call 127.0.0.1 (not domain)
Config attatched (please check it first)
if kiwiirc is calling 127.0.0.1 then that must be what is in static/config.json fileuploader.server
Come see me on https://web.libera.chat/#kiwiirc then you can pm me your kiwiirc url and I can take a look
if kiwiirc is calling 127.0.0.1 then that must be what is in static/config.json
fileuploader.server
Come see me on https://web.libera.chat/#kiwiirc then you can pm me your kiwiirc url and I can take a look
Please check config (attached) first write comment
"plugins": [
{
"name": "fileuploader",
"url": "static/plugins/fileuploader/plugin-fileuploader.js"
}
],
"fileuploader" : {
"server": "https://irc.example.com/upload",
"maxFileSize": 31457280,
"note": "Add an optional note to the upload dialog"
}
This is my config (domain replaced)
I was used it but it call 127.0.0.1 (not irc.example.com/upload)
maybe you put 127.0.0.1 into basePath in fileuploader.config.toml
. basePath is used after the first OPTIONS
request to the server
maybe try putting a full domain name into basePath, it could also be it not getting x-forwarded-for headers from reverse proxy
maybe try putting a full domain name into basePath, it could also be it not getting x-forwarded-for headers from reverse proxy
Thanks for help
I was change basepath /files -> https://irc.example.com/files now it not call 127.0.0.1
that sure looks closer to working, also looks like it is uploading but failing a download check. after upload it downloads the HEAD of the file to get its file size etc
you maybe need to force http 1.1 on your reverse proxy https://gist.github.com/ItsOnlyBinary/ae8d41c4542e66bb259b0f1b312c7d29#file-kiwiirc-nginx-L54
you maybe need to force http 1.1 on your reverse proxy https://gist.github.com/ItsOnlyBinary/ae8d41c4542e66bb259b0f1b312c7d29#file-kiwiirc-nginx-L54
**location /upload {
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-host $Host;
proxy_set_header X-Forwarded-Proto $scheme;
#Disable request and response buffering
proxy_request_buffering off;
proxy_buffering off;
proxy_http_version 1.1;
proxy_pass http://127.0.0.1:8088;
}**
Current Config
If i try :8088/files it fail to upload
location /upload/ {
proxy_pass http://127.0.0.1:8088/upload/;
also make sure your basePath
and fileuploader.server
have trailing /
location /upload/ {
proxy_pass http://127.0.0.1:8088/upload/;
also make sure yourbasePath
andfileuploader.server
have trailing/
If i add '/' on proxy_pass it faile to upload add '/' on basepath nothing changed
I tried download HEAD i found
upload not found
it all
maybe errors creating/writing files in fileuploader service?
Thank for help
I found another problem (but almost done)
I use script to run fileuploader and run it by init.d
Now i run it manually it work well but not worked with init.d
I will debug my server (it will need time)
I wsa busy with work
Now all fixed (I found Rename failed and fixed it with chown)
All configs attached for someone on future
irc.example.com.conf.txt
NGINX Reverse Config example
fileuploader.config.toml.txt
Kiwi FileUploader Config
config.json.txt
Kiwi Static Config