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

[Bug]: piclist客户端设置piclist-core搭建的服务端作为图床时,上传失败 #236

Closed
3 tasks done
yqs112358 opened this issue Aug 17, 2024 · 4 comments
Closed
3 tasks done
Assignees
Labels
bug Something isn't working

Comments

@yqs112358
Copy link

前置阅读 | Pre-reading

PicList的版本 | PicList Version

v2.9.2

系统信息 | System Information

Windows

问题重现 | Bug reproduce

  1. 服务端使用piclist-core搭建服务端,通过HTTP API上传图片时一切正常
  2. 客户端设置此服务端为图床上传后端,相关配置文件如下:
"piclist": {
      "_configName": "local",
      "_id": "5958d476-52b7-4d16-bd4e-bf4d6d1c35bb",
      "_createdAt": 1723863275585,
      "_updatedAt": 1723874964901,
      "host": "https://xxxxx.xxxxx.com",
      "port": "xxxxx",
      "picbed": "local",
      "configName": "config",
      "serverKey": "xxxxxxxxxxxxxx"
    },

按配置中一样的地址、端口和serverKey,可以正常走HTTP API上传图片,但是在客户端设置piclist uploader上传时则失败,错误日志见下

相关日志 | Logs

2024-08-17 14:08:05 [PicList INFO] Before transform 
2024-08-17 14:08:05 [PicList INFO] Transforming... Current transformer is [path] 
2024-08-17 14:08:05 [PicList INFO] Before upload 
2024-08-17 14:08:05 [PicList INFO] beforeUploadPlugins: renameFn running 
2024-08-17 14:08:05 [PicList INFO] Uploading... Current uploader is [piclist] 
2024-08-17 14:08:06 [PicList WARN] failed 
2024-08-17 14:08:06 [PicList ERROR] 
------Error Stack Begin------
Error
    at Object.yr [as handle] (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:78585)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Gt.doUpload (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:47027)
    at async Gt.start (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:45869)
    at async pn.upload (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:158089)
    at async Object.upload (C:\Program Files\PicList\resources\app.asar\index.js:8:2101967)
    at async wo (C:\Program Files\PicList\resources\app.asar\index.js:8:2109816)
    at async IpcMainImpl.rpcEventHandler (C:\Program Files\PicList\resources\app.asar\index.js:8:2463698)
-------Error Stack End------- 
2024-08-17 14:08:06 [PicList ERROR] 
------Error Stack Begin------
Error
    at Object.yr [as handle] (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:78585)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Gt.doUpload (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:47027)
    at async Gt.start (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:45869)
    at async pn.upload (C:\Program Files\PicList\resources\app.asar\node_modules\piclist\dist\index.cjs.js:1:158089)
    at async Object.upload (C:\Program Files\PicList\resources\app.asar\index.js:8:2101967)
    at async wo (C:\Program Files\PicList\resources\app.asar\index.js:8:2109816)
    at async IpcMainImpl.rpcEventHandler (C:\Program Files\PicList\resources\app.asar\index.js:8:2463698)
-------Error Stack End------- 
@yqs112358 yqs112358 added the bug Something isn't working label Aug 17, 2024
@Kuingsmile
Copy link
Owner

image
自己加https了?

@yqs112358
Copy link
Author

自己加https了?

对😂我给整个服务套了个nginx做https的,有这方面的原因嘛?
我试了一下,不加https就直接连不上了

@yqs112358
Copy link
Author

http api直接上传没问题,不知为啥客户端不行,照理走的是同一个地址呢🤔

@Kuingsmile
Copy link
Owner

Kuingsmile commented Aug 20, 2024

没考虑自己做反代这种情况
image
代码里直接拼接的地址,我修改下判断逻辑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants