文件上传部署版本

This commit is contained in:
XaoLi717 2024-10-17 16:17:53 +08:00
parent f4aaa5bfe0
commit a165ff0078
2 changed files with 4 additions and 1 deletions

1
.env
View File

@ -25,6 +25,7 @@ VITE_AI_URL = http://192.168.1.25:8000
#Onlyoffice相关
VITE_ONLY_URL = http://140.143.164.40:48080
; VITE_ONLY_URL = http://192.168.1.15:48080
# 默认账户密码
VITE_APP_DEFAULT_LOGIN_TENANT = 君风科技

View File

@ -165,7 +165,9 @@ const upload = async (myFile:any) => {
}
formData.append('file', myFile);//form
try {
await axios.post('${config.only_url}/admin-api/only/onlyof/update', formData, configs);
console.log("ok")
await axios.post(`${config.only_url}/admin-api/only/onlyof/update`, formData, configs);
console.log("ok")
} catch (error) {
console.error('Upload failed:', error);
}