mirror of
https://github.com/strapi/strapi.git
synced 2025-07-24 17:40:18 +00:00
get extension from filename when bin
This commit is contained in:
parent
41dae37e1f
commit
4de86c4927
@ -70,7 +70,9 @@ module.exports = ({ strapi }) => ({
|
|||||||
|
|
||||||
let ext = '.' + extension(type);
|
let ext = '.' + extension(type);
|
||||||
// If it is a file , get the extension from the filename.
|
// If it is a file , get the extension from the filename.
|
||||||
ext = ext === '.bin' ? path.extname(filename) : '.bin';
|
if (ext === '.bin') {
|
||||||
|
ext = path.extname(filename);
|
||||||
|
}
|
||||||
const basename = path.basename(fileInfo.name || filename, ext);
|
const basename = path.basename(fileInfo.name || filename, ext);
|
||||||
const usedName = fileInfo.name || filename;
|
const usedName = fileInfo.name || filename;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user