lsc 2 months ago
parent
commit
90a099f0eb
1 changed files with 3 additions and 3 deletions
  1. 3 3
      js/Common/uploadR2R.js

+ 3 - 3
js/Common/uploadR2R.js

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