mirror of
https://github.com/strapi/strapi.git
synced 2025-12-26 14:44:31 +00:00
fix: example data, media files uniqueness
This commit is contained in:
parent
80ca535360
commit
006b5570c8
@ -99,7 +99,7 @@ async function checkFileExistsBeforeUpload(files) {
|
||||
// Check if the file already exists in Strapi
|
||||
const fileWhereName = await strapi.query('plugin::upload.file').findOne({
|
||||
where: {
|
||||
name: fileName,
|
||||
name: fileName.replace(/\..*$/, ''),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -113,7 +113,7 @@ async function checkFileExistsBeforeUpload(files: string[]): Promise<any> {
|
||||
// Check if the file already exists in Strapi
|
||||
const fileWhereName = await strapi.query('plugin::upload.file').findOne({
|
||||
where: {
|
||||
name: fileName,
|
||||
name: fileName.replace(/\..*$/, ''),
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user