Merge pull request 'refs #5553 Don't save image extension' (!1453) from 5553-dontSaveImageExtension into master
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-on: #1453 Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
a41cf2f3f9
|
@ -30,13 +30,14 @@ module.exports = Self => {
|
|||
);
|
||||
|
||||
// Insert image row
|
||||
const imageName = path.parse(fileName).name;
|
||||
await models.Image.upsertWithWhere(
|
||||
{
|
||||
name: fileName,
|
||||
name: imageName,
|
||||
collectionFk: collectionName
|
||||
},
|
||||
{
|
||||
name: fileName,
|
||||
name: imageName,
|
||||
collectionFk: collectionName,
|
||||
updated: Date.vnNow() / 1000,
|
||||
}
|
||||
|
@ -50,7 +51,7 @@ module.exports = Self => {
|
|||
if (entity) {
|
||||
await entity.updateAttribute(
|
||||
collection.property,
|
||||
fileName
|
||||
imageName
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue