mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-03-21 19:13:10 +00:00
fix(cloud): 修改上传接口Cookie参数传递方式
- 将Cookie参数从URL查询字符串改为请求体传递 - 更新token接口调用以将cookie作为data参数发送 - 更新complete接口调用以将cookie作为data参数发送 - 修改API文档说明Cookie参数传递方式变更 - 确保Cookie值通过POST请求体安全传输
This commit is contained in:
parent
a09f126ab2
commit
1ad8ab088f
@ -490,8 +490,9 @@
|
|||||||
|
|
||||||
const tokenRes = await axios({
|
const tokenRes = await axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: `/cloud/upload/token?time=${Date.now()}&cookie=${localStorage.getItem('cookie')}`,
|
url: `/cloud/upload/token?time=${Date.now()}`,
|
||||||
data: {
|
data: {
|
||||||
|
cookie: localStorage.getItem('cookie'),
|
||||||
md5: md5,
|
md5: md5,
|
||||||
fileSize: fileSize,
|
fileSize: fileSize,
|
||||||
filename: filename,
|
filename: filename,
|
||||||
@ -552,8 +553,9 @@
|
|||||||
|
|
||||||
const completeRes = await axios({
|
const completeRes = await axios({
|
||||||
method: 'post',
|
method: 'post',
|
||||||
url: `/cloud/upload/complete?time=${Date.now()}&cookie=${localStorage.getItem('cookie')}`,
|
url: `/cloud/upload/complete?time=${Date.now()}`,
|
||||||
data: {
|
data: {
|
||||||
|
cookie: localStorage.getItem('cookie'),
|
||||||
songId: tokenData.songId,
|
songId: tokenData.songId,
|
||||||
resourceId: tokenData.resourceId,
|
resourceId: tokenData.resourceId,
|
||||||
md5: tokenData.md5,
|
md5: tokenData.md5,
|
||||||
|
|||||||
@ -2800,6 +2800,7 @@ type : 地区
|
|||||||
**接口地址 :** `/cloud/upload/token`
|
**接口地址 :** `/cloud/upload/token`
|
||||||
|
|
||||||
**必选参数 :**
|
**必选参数 :**
|
||||||
|
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
|
||||||
- `md5`: 文件 MD5 值
|
- `md5`: 文件 MD5 值
|
||||||
- `fileSize`: 文件大小(字节)
|
- `fileSize`: 文件大小(字节)
|
||||||
- `filename`: 文件名
|
- `filename`: 文件名
|
||||||
@ -2823,6 +2824,7 @@ type : 地区
|
|||||||
**接口地址 :** `/cloud/upload/complete`
|
**接口地址 :** `/cloud/upload/complete`
|
||||||
|
|
||||||
**必选参数 :**
|
**必选参数 :**
|
||||||
|
- `cookie`: 网易云音乐 Cookie (在请求体中传递)
|
||||||
- `songId`: 歌曲 ID
|
- `songId`: 歌曲 ID
|
||||||
- `resourceId`: 资源 ID
|
- `resourceId`: 资源 ID
|
||||||
- `md5`: 文件 MD5
|
- `md5`: 文件 MD5
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user