lsc 2 tháng trước cách đây
mục cha
commit
e7fc0d1c02
1 tập tin đã thay đổi với 3 bổ sung3 xóa
  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 = {
+    let params = new URLSearchParams({
       n: file.name,
       did: uuid,
       uid: userid,
       fid: folderid,
       mofid: moFolderid !== folderid ? moFolderid : ""
-    };
+    }).toString();
     const res2 = await fetch('http://10.3.16.166:7004/file/addFile', {
       method: 'POST',
       headers: {
         'Content-Type': 'application/x-www-form-urlencoded'
       },
-      body: params // 将params对象转换为JSON字符串
+      body: params
     });
     console.log("上传成功");
     return { code: 200, msg: "上传成功" }