mirror of
https://github.com/strapi/strapi.git
synced 2025-10-28 16:39:37 +00:00
Use path.extname if mime-type doesnt find extension
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
This commit is contained in:
parent
89af73ca14
commit
b44a57d408
@ -33,7 +33,7 @@ const combineFilters = params => {
|
||||
|
||||
module.exports = {
|
||||
formatFileInfo({ filename, type, size }, fileInfo = {}, metas = {}) {
|
||||
const ext = '.' + mime.extension(type);
|
||||
const ext = '.' + mime.extension(type) || path.extname(filename);
|
||||
const baseName = path.basename(filename, path.extname(filename));
|
||||
|
||||
const usedName = fileInfo.name || baseName;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user