Context
The KYC upload flow in src/controllers/upload.controller.ts replaces the existing document URL for a submission, but the system does not clearly preserve the history of what was previously uploaded. This creates ambiguity for compliance review and manual moderation.
Problem statement
Implement a simple audit trail for KYC document reuploads so moderators and operators can see when a document was replaced and which file versions were previously associated with the submission.
Current behavior
- The controller updates the KYC submission document URL directly when a new file is uploaded.
- Previous document URLs are not preserved in a structured way for later review.
Required behavior
- Each document reupload should create a traceable history entry that records the replaced file reference and timestamp.
- The system should expose the history in a way that can be consumed by a future moderation view or API endpoint.
- The implementation should not break the current upload flow.
Constraints
- The change should avoid introducing a new storage backend or major schema redesign.
- Existing KYC upload behavior should remain compatible.
Acceptance criteria
Out of scope
- Building a full moderation dashboard.
- Changing the KYC submission schema beyond what is necessary for history tracking.
Hints and references
- Review the KYC submission model and the upload controller logic for where the replacement should be recorded.
Context
The KYC upload flow in src/controllers/upload.controller.ts replaces the existing document URL for a submission, but the system does not clearly preserve the history of what was previously uploaded. This creates ambiguity for compliance review and manual moderation.
Problem statement
Implement a simple audit trail for KYC document reuploads so moderators and operators can see when a document was replaced and which file versions were previously associated with the submission.
Current behavior
Required behavior
Constraints
Acceptance criteria
Out of scope
Hints and references