File attachments in Orbeon Forms
As a quick review, Orbeon Forms supports the following file attachment form controls, available in the Form Builder toolbox:
Attachment Type | Description |
---|---|
Static Image | image attachment set by the form author |
Image Attachment 1 | image attachment that can be uploaded and downloaded by the form user |
Single File Attachment | a single file attachment that can be uploaded and downloaded by the form user |
Multiple File Attachments | multiple file attachments that can be uploaded and downloaded by the form user |
For example, here is how file attachments look at runtime:
Video attachments
With Orbeon Forms 2023.1, we introduced a new type of attachment: video attachments. Like for images, there are two separate form controls:
Attachment Type | Description |
---|---|
Static Video 2 | video attachment set by the form author |
Video Attachments | video attachment that can be uploaded and downloaded by the form user |
As the name implies, this new attachment type allows you to attach videos to your forms. In addition, you can play them directly in the web browser.3
Storage options
Orbeon Forms now supports storing attachments on disk, instead of the relational database.
If you handle large and/or a large number of attachments, this can improve performance and reduce the size of the database. This is a simple configuration setting away (see the documentation).
Use of attachments
Attachments can be used in many ways. They can be:
- stored in the database or on disk for further editing and viewing in forms (default);
- attached to emails sent by the form;
- sent to service endpoints;
- included in PDFs generated by the form (images).
See also
We hope you will enjoy this feature of Orbeon Forms 2023.1!
-
Image attachments optionally allow downloads, as well as resizing and recompression of the image upon upload. ↩
-
Static videos are useful, for example, for explanations and tutorials. ↩
-
Handling videos required modifying the Orbeon Forms backend to support so-called byte ranges, so that you can not only serve the video, but efficiently seek within the video. ↩