Uploading Files
File input elements are HTML controls in the form ofcam-max-filesize directive. To upload larger files without freezing the browser, see the custom javascript section.
Files can be uploaded using the cam-variable-name and cam-variable-type directives:
INVOICE_DOCUMENT.
Besides uploading a file, it is also possible to present the user with a download link or displaying files as images.
Downloading Files
Thecam-file-download directive turns a link into a file download link.
INVOICE_DOCUMENT.
If the link has no text content, the filename of the file will be set as text content.
Displaying an Uploaded Image
If the user uploaded an image, it can be displayed using an<img> tag. There is no special directive for this yet.
However, you can make sure that the corresponding variable is fetched (either using javascript or an hidden input field) and then
use the generated link as value for the src attribute.
Note: the above example uses the angular js integration.