mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
fix(cloud): 修改上传接口Cookie参数传递方式
- 将Cookie参数从URL查询字符串改为请求体传递 - 更新token接口调用以将cookie作为data参数发送 - 更新complete接口调用以将cookie作为data参数发送 - 修改API文档说明Cookie参数传递方式变更 - 确保Cookie值通过POST请求体安全传输
This commit is contained in:
+4
-2
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user