By default, the case page template in the Cosmos Theme provides the same attachment utility that was included in UI-Kit 12 and higher. This attachment utility is named 'Files and Documents. It lets you attach different types of content (rich text, local file and url)
When attaching a simple file (using the local file option), you need to provide a name for the attachment - a new document will be created and the file will be attached to the document. this utility allows previewing the attachment using the preview panel (if the file is of type pdf or an image) as well as to drill down into the document.
only one file can be attached at a time using the modal dialog - you need to open a new modal dialog for every file
each file is attached to a separate document - previewing the attachment will require drilling down into the document case type
it is not possible to select the category type of the attached file
This document describes how to use the old attachment utility widget that was provided in UI-Kit 11 or lower in Theme-Cosmos. The older attachment utility only supports local files and URLs - it is not possible to attach rich text content. the old utility does also not support preview or the preview panel - the only option available is to download the file
Clicking on the wheel button in the utility will bring an action menu that lets you add a file or a URL
@RichardMarsot - This is great! I haven’t tried it out, but I will.
Can anyone answer why multiple files and Attachment Category options were removed? They seemed to be pretty fundamental and much-needed functionality. I am a Solutions Consultant, and these two capabilities come up a lot.
Also, why does App Studio allow me to define Attachment Categories if I can’t even reference them from the OOTB attachment functionality? The only possible use of Attachment Categories in App Studio is the “Attachment” data type for fields, but such a field only allows a single file to be attached. So, how would I upload multiple files of the same category?
Who can explain the reasons for this, and whether there are ways to get that original functionality OOTB (i.e., without the workaround posted here)? It seems we must just be missing something, as surely that functionality wasn’t just removed…?
@RichardMarsot Thanks for sharing this update and worked for me. Happy to see my old file attachment section to upload multiple files to the case in Cosmos env.
This is great. Made users really happy. Thank you. But with the recent upgrade version 8.6, the UI for the section is broken as shown in the below screenshot.
@VinitaB2 your filename is a single word and too long to fit into the utility panel - it needs to be wrapped within an ellipsis. This can be done by adding the text-ellipsis help class on the text component
@switm the attachment utility has evolved several years ago to make each attachment, a standalone document. The older implementation is still available but is not the default configuration. Attachment category is also used when create a new property of type ‘attachment’
@RichardMarsot : Is there any plan to introduce the below features with any future Theme-Cosmos versions in the near future:
Upload multiple files (instead of going with the suggested option in the above article of Theme UI-Kit version).
Local File to be first default option instead of Rich Text (Local file is the only option our users use). We want to avoid customizing any OOTB rule to achieve this.
There is no option to let a user know if a file has been reviewed(they need to delete the old attachment and upload a new one with the prefix Reviewed_ to currently identify this.
Download All files of the case instead of a single file download.