Browse Source

Merge branch 'master' of http://git.fmode.cn:3000/bin/edu-textbook

warrior 5 months ago
parent
commit
0519dd7692
1 changed files with 1 additions and 0 deletions
  1. 1 0
      server/lib/docs/index.js

+ 1 - 0
server/lib/docs/index.js

@@ -169,6 +169,7 @@ export async function downloadUrl(url,options) {
         // 文件名转MD5
         let md5 = crypto.createHash('md5');
         let extname = path.extname(url)?.toLocaleLowerCase();
+        extname = extname?.split("?")?.[0]
         filename = md5.update(url).digest('hex') + extname;
     }