Skip to content

Commit

Permalink
fix(plugins-songUpload): compatibility method
Browse files Browse the repository at this point in the history
use replace rather than replaceAll
  • Loading branch information
foamzou authored May 21, 2022
1 parent 844dabe commit c43bb9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/songUpload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit c43bb9c

Please sign in to comment.