diff --git a/docs/features/code-based/FILE_UPLOAD.md b/docs/features/code-based/FILE_UPLOAD.md new file mode 100644 index 000000000..3781ca18e --- /dev/null +++ b/docs/features/code-based/FILE_UPLOAD.md @@ -0,0 +1,282 @@ +# File Upload Feature + +Our forms platform allows users to upload files as part of their form submissions. This feature is designed to work for both users with JavaScript enabled and those without, ensuring accessibility and reliability. + +As our service is written for the Department for Environment, Food & Rural Affairs (Defra), our current file upload feature is coupled to the in-house technology and tools, including the Core Delivery Platform (CDP)'s file upload service (`cdp-uploader`). + +## Overview + +The file upload system consists of several key components. `FileUploadPageController` manages the upload page, handling user navigation, validation, and error states. `FileUploadField` defines the file input field with validation rules and display options. `cdp-uploader` is an external service that handles file scanning and delivery to S3, while `forms-submission-api` provides backend services for file persistence and lifecycle management. + +## How File Upload Works + +### User Experience + +When JavaScript is enabled, users upload files directly to `cdp-uploader` for virus scanning and delivery through a `