|
@@ -27,20 +27,20 @@ window.uploadFile = async function ({ file, uuid, userid, folderid, moFolderid }
|
|
|
// 'Accept': 'application/json',
|
|
|
// }
|
|
|
// });
|
|
|
-
|
|
|
- let params = {
|
|
|
+ const json = {
|
|
|
n: file.name,
|
|
|
did: uuid,
|
|
|
uid: userid,
|
|
|
fid: folderid,
|
|
|
mofid: moFolderid !== folderid ? moFolderid : ""
|
|
|
};
|
|
|
+ const params = new URLSearchParams({ json: JSON.stringify(json) });
|
|
|
const res2 = await fetch('http://10.3.16.166:7004/file/addFile', {
|
|
|
method: 'POST',
|
|
|
headers: {
|
|
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
|
},
|
|
|
- body: JSON.stringify(params)
|
|
|
+ body: params
|
|
|
});
|
|
|
console.log("上传成功");
|
|
|
return { code: 200, msg: "上传成功" }
|