From ab21e0e73f0c4ad98e80e057ddb3001f93e914bb Mon Sep 17 00:00:00 2001 From: xw Date: Wed, 3 Aug 2022 15:57:59 +0800 Subject: [PATCH] feat: The default url of the custom upload logic follows the current deployment path (#166) --- src/components/CodemirrorEditor/uploadImgDialog.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CodemirrorEditor/uploadImgDialog.vue b/src/components/CodemirrorEditor/uploadImgDialog.vue index 15f8531..5044939 100644 --- a/src/components/CodemirrorEditor/uploadImgDialog.vue +++ b/src/components/CodemirrorEditor/uploadImgDialog.vue @@ -448,7 +448,7 @@ export default { const {file, util, okCb, errCb} = CUSTOM_ARG const param = new FormData() param.append('file', file) - util.axios.post('http://127.0.0.1:9000/upload', param, { + util.axios.post('${window.location.origin}/upload', param, { headers: { 'Content-Type': 'multipart/form-data' } }).then(res => { okCb(res.url)