fix(plugins-songUpload): compatibility method

use replace rather than replaceAll
This commit is contained in:
foam 2022-05-21 10:16:07 +08:00 committed by GitHub
parent 844dabeeff
commit c43bb9cb15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,8 @@ module.exports = async (query, request) => {
}
const filename = query.songFile.name
.replace('.' + ext, '')
.replaceAll(' ', '_')
.replaceAll('.', '_')
.replace(/\s/g, '')
.replace(/\./g, '_')
// 获取key和token
const tokenRes = await request(
'POST',