fix(cloud): 修改上传接口Cookie参数传递方式

- 将Cookie参数从URL查询字符串改为请求体传递
- 更新token接口调用以将cookie作为data参数发送
- 更新complete接口调用以将cookie作为data参数发送
- 修改API文档说明Cookie参数传递方式变更
- 确保Cookie值通过POST请求体安全传输
This commit is contained in:
LaoShui 2026-02-18 19:37:32 +08:00
parent a09f126ab2
commit 1ad8ab088f
2 changed files with 6 additions and 2 deletions

View File

@ -490,8 +490,9 @@
const tokenRes = await axios({
method: 'post',
url: `/cloud/upload/token?time=${Date.now()}&cookie=${localStorage.getItem('cookie')}`,
url: `/cloud/upload/token?time=${Date.now()}`,
data: {
cookie: localStorage.getItem('cookie'),
md5: md5,
fileSize: fileSize,
filename: filename,
@ -552,8 +553,9 @@
const completeRes = await axios({
method: 'post',
url: `/cloud/upload/complete?time=${Date.now()}&cookie=${localStorage.getItem('cookie')}`,
url: `/cloud/upload/complete?time=${Date.now()}`,
data: {
cookie: localStorage.getItem('cookie'),
songId: tokenData.songId,
resourceId: tokenData.resourceId,
md5: tokenData.md5,

View File

@ -2800,6 +2800,7 @@ type : 地区
**接口地址 :** `/cloud/upload/token`
**必选参数 :**
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
- `md5`: 文件 MD5 值
- `fileSize`: 文件大小(字节)
- `filename`: 文件名
@ -2823,6 +2824,7 @@ type : 地区
**接口地址 :** `/cloud/upload/complete`
**必选参数 :**
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
- `songId`: 歌曲 ID
- `resourceId`: 资源 ID
- `md5`: 文件 MD5