mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-17 05:38:04 +00:00
fix: 云盘无法上传的bug
This commit is contained in:
parent
dd65c67568
commit
aa418cd0d7
34 changed files with 445 additions and 19 deletions
|
|
@ -5,7 +5,7 @@ module.exports = async (query, request) => {
|
|||
'POST',
|
||||
`https://music.163.com/weapi/nos/token/alloc`,
|
||||
{
|
||||
bucket: '',
|
||||
bucket: 'jd-musicrep-privatecloud-audio-public',
|
||||
ext: 'mp3',
|
||||
filename: query.songFile.name.replace('.mp3', ''),
|
||||
local: false,
|
||||
|
|
@ -21,7 +21,7 @@ module.exports = async (query, request) => {
|
|||
try {
|
||||
await axios({
|
||||
method: 'post',
|
||||
url: `http://45.127.129.8/ymusic/${objectKey}?offset=0&complete=true&version=1.0`,
|
||||
url: `http://45.127.129.8/jd-musicrep-privatecloud-audio-public/${objectKey}?offset=0&complete=true&version=1.0`,
|
||||
headers: {
|
||||
'x-nos-token': tokenRes.body.result.token,
|
||||
'Content-MD5': query.songFile.md5,
|
||||
|
|
@ -29,9 +29,12 @@ module.exports = async (query, request) => {
|
|||
'Content-Length': String(query.songFile.size),
|
||||
},
|
||||
data: query.songFile.data,
|
||||
maxContentLength: Infinity,
|
||||
maxBodyLength: Infinity,
|
||||
})
|
||||
} catch (error) {
|
||||
console.log('error', error.response)
|
||||
throw error.response
|
||||
}
|
||||
return {
|
||||
...tokenRes,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue