mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +00:00
fix(upload): normalize the string used as basename
This commit is contained in:
parent
45831f30f5
commit
0cf5d3c654
@ -77,8 +77,8 @@ module.exports = ({ strapi }) => ({
|
||||
if (!ext) {
|
||||
ext = `.${extension(type)}`;
|
||||
}
|
||||
const basename = path.basename(fileInfo.name || filename, ext);
|
||||
const usedName = fileInfo.name || filename;
|
||||
const usedName = (fileInfo.name || filename).normalize();
|
||||
const basename = path.basename(usedName, ext);
|
||||
|
||||
const entity = {
|
||||
name: usedName,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user