DeepSpaceHarbor / hexo-bridge

Command center for websites powered by hexo.
GNU General Public License v3.0
32 stars 6 forks source link

Upload file failed #182

Closed zrenx closed 1 year ago

zrenx commented 1 year ago

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
DeepSpaceHarbor commented 1 year ago

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

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