1.8 KiB
1.8 KiB
WP-51 — OpenZaak Documenten (DRC) upload + link
Status: done (5807937)
Phase: 9 — OpenZaak / ZGW integration
Why
Uploaded documents currently persist as bytes in local SQLite (DocumentStore). To be
production-ready they must live in OpenZaak's Documenten API (DRC) as
enkelvoudiginformatieobjecten, linked to a Zaak via zaakinformatieobject — behind the same
config gate, still without a FE contract change.
Read first
- openzaak-integration.md
- WP-49 (the seam pattern), WP-50 (create-zaak, the zaak to link to)
Decisions (pre-made, don't relitigate)
- Introduce an
IDocumentSourcesibling ofIZaakSource; local impl =DocumentStore, OpenZaak impl = DRC. FE upload DTOs unchanged. - A document needs an
informatieobjecttypeURL from Catalogi (like zaaktype for a zaak). - Upload → returns document URL →
zaakinformatieobjectlinks it to the zaak URL.
Files
Data/IDocumentSource.cs,Data/LocalDocumentSource.cs,Zgw/OpenZaakDocumentSource.csZgwOptions:informatieobjecttypeURL(s) +DrcBaseUrl.
Steps
- Abstract the upload/read/link paths behind
IDocumentSource. - OpenZaak impl: POST
enkelvoudiginformatieobjecten(content), then POSTzaakinformatieobjecten. - Map DRC document metadata back into the existing document DTOs.
Acceptance criteria
- With
Zgw:Enabled=true, an upload lands in DRC and is linked to its zaak. - FE upload/list DTOs unchanged; no api-client drift.
- Tests cover the DRC POST bodies + the zaak-link step (stub handler).
Verification
dotnet test; against a docker OpenZaak if available.
Out of scope
Notificaties (WP-52), content virus-scanning / blob-storage tuning.
Risks
Large file content over base64/multipart — mind memory; stream if needed.