huridocs / uwazi

Uwazi is a web-based, open-source solution for building and sharing document collections
http://www.uwazi.io
MIT License
233 stars 80 forks source link

Referencing attachments in metadata with multiple values #4383

Open Zasa-san opened 2 years ago

Zasa-san commented 2 years ago

Currently, the process to save/update an entity with attachments referenced in the metadata via API only works for the first element of the array. It should consider all elements of the array.

txau commented 2 years ago

@Zasa-san does it mean that you can add several attachments but you can't add them directly to the metadata fields, only the first one will work? From what I have tested, you can add the attachment directly but you cannot use it in ie- a media field until you save (via UI).

Zasa-san commented 2 years ago

@txau I should've mentioned this was when saving via API calls. Right now you can via API save/update an entity and attach and reference files to metadata fields. But the process considers that value is always on the first element of the metadata array.

RafaPolit commented 2 years ago

@Zasa-san has confirmed that this is a tech-dev / bug that should be extended to work with multiple values on the image and media fields, but currently our client has no way to send more than one value, nor can it render multiple values. So, this is a "for when that happens" scenario so that we don't forget about this.