This commit is contained in:
parent
378400c6d2
commit
1c4f919e89
|
@ -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