Download Attachments via Link #11350
-
I have an attachments field that can hold multiple attachmemts. These attachments subsequently need to be presented for download. When using a table presentation, the list of attachments gets truncated (+ 4 more ) and are no longer accessible. As below. I have played around with nested repeater blocks and array fields to iterate over all of the files in an attachment field and present them differently as links (see below). This is fine, but I can't seem to be able to download the file using this approach, which is my desired outcome. Any ideas? Either displaying all attachments in tabular format (eliminating the +4 more) or allowing a file to be downloaded via link component would be great. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Hey @Brrrradley, I think i've achieved what you are after with some minor JS plus the use of the repeater and embed component. Below is the component tree as well as the JS code used within the binding to achieve the desired effect.
I hope this makes sense and is helpful, if you have any questions around this let me know. |
Beta Was this translation helpful? Give feedback.
-
Hi! How to download files with the original file names ( like foto1.jpg) and not like 8d44rf-frefw7e87rw6-fewu437f.jpg? |
Beta Was this translation helpful? Give feedback.
Hey @Brrrradley,
I think i've achieved what you are after with some minor JS plus the use of the repeater and embed component. Below is the component tree as well as the JS code used within the binding to achieve the desired effect.
Component tree
JS Code
Output
I hope this makes sense and is helpful, if you have any questions around this let me know.