Image for entity Person

we want to upload an image file used for an attribute in entity Person as an avatar photo

  • we already have checked your documentation and have investigated example solution with extending user table
  • but this doesn’t help as we don’t want to extend user entity.

can you please distribute a documentation for using an image in editor screen for an attribute of entity ?

Hi,

Have you seen this sample project - GitHub - cuba-platform/sample-user-avatar: Adding avatars to system users? Note that extension of system user entity used only as an example, the approach is shown in the example can be applied to any entity. Just add an attribute with type FileDescriptor to your entity. Moreover FieldGroup component presents such fields using FileUpload components.

Regards,

Gleb

Hi,

Also you can have a look on this project, which solves exactly the task you have.

See the Customer Edit screen and its controller. This screen shows a picture, that is stored in the Customer#logo field.

Regards,

Aleksey

1 Like

Thank you Aleksey. Your project helped a lot.

1 Like