Modelling attachments by reference

Hi.

I just looked over this thin documentation: Document Modeling | GetA12-Docs

Since the “attachment” Field Type explicitly contains a “content” Field, I assume, this type is used with “Inline Attachments”.

What is to do, when my Document is only loosly coupled with attachments? In our application, the parent document shall not contain the “inline attachment”. However, the backend delivers UUIDs etc. in a way, that the client loads the attachment binary explicitly in another backend call.

Is the correct type for doing so, still the “attachment” type? Is there any guide available which describes the several operation modes (by reference, inline, …).

I put this question explicitly in the Modelling part, because we have no Dataservices in practise.

Hi @stefan-cached-grove

Using the Attachment will mean that the Attachment Group can be referenced in Form, Overview and Tree Models. This means that, once the data has been loaded, a preview of the Attachement can be shown in the UI Model. You also get default actions to upload, download or replace the attachment in the Form.

How the data loading and actions would exactly work with your backend would need to be carefully planned, but I would still suggest trying to use the attachment group so that you can re-use the default functionality.

I imagine that you would use the attachment_id Field to reference the attachment / save the UUID. Please ensure that the other Validation Rules in the Attachment Group are also fulfilled.

  • AttachmentInternalFilenameRequired
  • AttachmentMimeTypeRequired