Merge pull request #15151 from strapi/fix/media-upload-diacritics

fix(upload): normalize the string used as basename
This commit is contained in:
Nathan Pichon 2022-12-20 15:45:18 +01:00 committed by GitHub
commit 76bdf07031
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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,