feat: The default url of the custom upload logic follows the current deployment path (#166)

This commit is contained in:
xw 2022-08-03 15:57:59 +08:00 committed by GitHub
parent 2b1fe2743a
commit ab21e0e73f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)