mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2025-12-10 16:12:50 +00:00
完善本地文件上传扩展名获取
This commit is contained in:
parent
e2810c149e
commit
f90eb9d63b
@ -39,7 +39,7 @@ export class CoolPlugin extends BasePluginHook implements BaseUpload {
|
||||
async downAndUpload(url: string, fileName?: string) {
|
||||
const { domain } = this.pluginInfo.config;
|
||||
// 从url获取扩展名
|
||||
const extend = path.extname(url);
|
||||
const extend = path.extname(fileName ? fileName : url);
|
||||
const download = require('download');
|
||||
// 数据
|
||||
const data = url.includes('http')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user