GavinGoo / pandora-web

复活原潘多拉,使其作为能使用OAI前端代理+自定义API的Web面板
GNU General Public License v2.0
172 stars 60 forks source link

怎么上传图片或者文本文件 #11

Closed huangzhitian closed 1 month ago

huangzhitian commented 1 month ago

image image

GavinGoo commented 1 month ago

能帮忙看看上传时/backend-api/files接口的响应内容吗?

huangzhitian commented 1 month ago

能帮忙看看上传时/backend-api/files接口的响应内容吗?

日志没有反应 image

GavinGoo commented 1 month ago

能帮忙看看上传时/backend-api/files接口的响应内容吗?

是F12开发者工具里 不好意思没说清楚

huangzhitian commented 1 month ago

能帮忙看看上传时/backend-api/files接口的响应内容吗?

是F12开发者工具里 不好意思没说清楚

image

GavinGoo commented 1 month ago

不对劲。你这个好像是网络问题,响应状态码也没有。试试绕过nginx访问上传呢?

huangzhitian commented 1 month ago

不对劲。你这个好像是网络问题,响应状态码也没有。试试绕过nginx访问上传呢?

我用宝塔反代绑定的域名,还真是这个问题,这个有解决方法吗?使用IP就能上传了,但是页面不显示图片是一张白板 image image

GavinGoo commented 1 month ago

试试我的nginx配置:

location / {
            proxy_http_version  1.1;
            proxy_pass      http://IP:端口;
            proxy_set_header    Connection      "";
            proxy_set_header    Host            $http_host;
            proxy_set_header    X-Forwarded-Proto   $scheme;
            proxy_set_header    X-Real-IP           $remote_addr;
            proxy_set_header    X-Forwarded-For     $proxy_add_x_forwarded_for;

            proxy_buffering off;
            proxy_cache off;
            chunked_transfer_encoding on;
            tcp_nopush on;
            tcp_nodelay on;

            send_timeout 600;
            proxy_connect_timeout 600;
            proxy_send_timeout 600;
            proxy_read_timeout 600;
            proxy_headers_hash_max_size 51200;
            proxy_headers_hash_bucket_size 6400;
}

宝塔的nginx配置文件目录可能是在:/www/server/panel/vhost/nginx

huangzhitian commented 1 month ago

试试我的nginx配置:

location / {
            proxy_http_version    1.1;
            proxy_pass        http://IP:端口;
            proxy_set_header  Connection      "";
            proxy_set_header      Host            $http_host;
            proxy_set_header  X-Forwarded-Proto   $scheme;
            proxy_set_header      X-Real-IP           $remote_addr;
            proxy_set_header      X-Forwarded-For     $proxy_add_x_forwarded_for;

            proxy_buffering off;
            proxy_cache off;
            chunked_transfer_encoding on;
            tcp_nopush on;
            tcp_nodelay on;

            send_timeout 600;
            proxy_connect_timeout 600;
            proxy_send_timeout 600;
            proxy_read_timeout 600;
            proxy_headers_hash_max_size 51200;
            proxy_headers_hash_bucket_size 6400;
}

宝塔的nginx配置文件目录可能是在:/www/server/panel/vhost/nginx

谢谢大佬我试试