mirror of
https://github.com/strapi/strapi.git
synced 2025-07-23 09:00:19 +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);
|
||||
// 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 usedName = fileInfo.name || filename;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user