Skip to main content

betaThis is a new capability. Help us improve it and give your feedback on Slack.

File Upload Page

A question page that handles file upload via the CDP file upload service. Must contain a FileUploadField component.

This controller manages the CDP file upload lifecycle: it initiates an upload session with cdp-uploader on each page load, sets the CDP upload URL as the form action so the browser posts files directly to CDP, polls CDP for the upload status on return, and populates session state with completed FileState entries. It is tightly coupled to the CDP file upload service and is the provided implementation for Defra teams. See the File Upload guide for setup instructions, including the required formSubmissionService interface.

Controller value:
"FileUploadPageController"

JSON definition

{
"path": "/page-path",
"controller": "FileUploadPageController",
"title": "Page title",
"components": []
}

Configuration

PropertyTypeRequiredDescription
componentsComponentDef[]YesArray of component definitions rendered on the page.
conditionstringNoName of a condition that controls whether this page is shown.
controllerControllerType.FileUploadYesThe page controller class name. Omit or use "PageController" for the default question page.
eventsEventsNoLifecycle hooks that fire when the page is loaded or saved.
idstringNoStable identifier for the page, used internally by the form engine.
pathstringYesURL path segment for the page (e.g. /details).
sectionstringNoName of a section that groups this page in the form.
titlestringYesHeading displayed to the user at the top of the page.
viewstringNoName of an alternative view template to render for this page.