Uploading files

This sample shows how to upload files from the web browser to a CXP page. After a file was uploaded, it can be processed within the page using the member variable :Files of the HttpRequest object. The sample first loads the HTML file upload-files-form.html that provides the user interface for selecting files that shall be uploaded. To make a file selectable in the HTML browser, an input element of type "file" must be specified in the HTML markup. In addition, the attributes of the HTML form which contains the input element must be set up as follows: the method attribute must be set to "post", and "multipart/form-data" must be specified for the enctype attribute.

Run in new tab
Live editor
Result built with V2 2156
I'm a warning toast!
I'm a success toast!