When you upload a file during entity creation you don’t have the file id in lifecycles hooks event.params.data
:
this is what I have when I upload a file and then create the entry:
data: {
name: 'Test Product',
description: 'Test description',
image: 14,
createdAt: ...,
updatedAt: ...
}
this is what I have when I upload a file during entity creation entry:
data: {
name: 'Test Product',
description: 'Test description',
createdAt: ...,
updatedAt: ...
}
this happens because the entity service creates first the entity and than the file here
for a more consistent API the entity service should first update the file and then create the entity with the id of the file