DeepSpaceHarbor / hexo-bridge

Command center for websites powered by hexo.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upload file failed

zrenx opened this issue · comments

I have hexo & hexo-bridge installed on a VPS server, with a working domain name. Everything works fine, except file uploads.
I think it's the hard-coded url "http://localhost:4000" causing the issue.

Errors showing in Console:

index-4d2eb3b7.js:149 Upload error: Ee {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …}
s @ index-4d2eb3b7.js:149
await in s (async)
(anonymous) @ index-4d2eb3b7.js:149
Zm @ index-4d2eb3b7.js:40
xl @ index-4d2eb3b7.js:40
K3 @ index-4d2eb3b7.js:40
Ia @ index-4d2eb3b7.js:40
iC @ index-4d2eb3b7.js:40
va @ index-4d2eb3b7.js:38
(anonymous) @ index-4d2eb3b7.js:40
index-4d2eb3b7.js:73     POST http://localhost:4000/api/assets/upload net::ERR_CONNECTION_REFUSED
(anonymous) @ index-4d2eb3b7.js:73
xhr @ index-4d2eb3b7.js:73
rk @ index-4d2eb3b7.js:75
request @ index-4d2eb3b7.js:75
(anonymous) @ index-4d2eb3b7.js:71
s @ index-4d2eb3b7.js:149
(anonymous) @ index-4d2eb3b7.js:149
Zm @ index-4d2eb3b7.js:40
xl @ index-4d2eb3b7.js:40
K3 @ index-4d2eb3b7.js:40
Ia @ index-4d2eb3b7.js:40
iC @ index-4d2eb3b7.js:40
va @ index-4d2eb3b7.js:38
(anonymous) @ index-4d2eb3b7.js:40

OMG, this is such an embarrassing mistake 😅
Thank you @zrenx for catching it!

I've published a new version - 2.0.2 with the fix. Uploads should start working as expected.