Skip to content

CAP-PFM-MTD-007Prepare Image and File Uploads

Markdown

CAP-PFM-MTD-007

Prepare Image and File Uploads

Markdown
  • DocumentDraft
  • Product intentConfirmed
  • ImplementationPartially observed

KindCapabilityProduct areaPlatformModuleMetadata and Organization-defined RecordsRevision1

Read atservices-platform ad3f6a65react-console baf6dae3

The Formal Contract

The narrative above explains; the sections below are authoritative — the rules, scenarios and tests this document binds.

Outcomes
A staff member needs a shared way to send a selected file before saving its owning record.Issuance records and audits the request.
Surfaces
consoleapi
Preconditions
The caller can request uploads; record-write permission is evaluated separately.
Postconditions
Issuance leaves one upload declaration and its security audit event.
Intent sources
services-platform:docs/milestones/PLAT-M10-image-and-file-fields.md#D1, D4services-platform:docs/milestones/plans/PLAT-M10-plan.md#6. Approach; 9. Acceptance scenarios

Controls

31 controls apply, from the corpus control catalogue.

TC-AVL-005 TC-AZ-001 TC-AZ-002 TC-AZ-003 TC-AZ-004 TC-CRY-001 TC-CRY-002 TC-CRY-003 TC-CRY-004 TC-DAT-001 TC-DAT-002 TC-DAT-003 TC-IAM-001 TC-IAM-002 TC-IAM-004 TC-IAM-005 TC-LOG-002 TC-LOG-003 TC-LOG-004 TC-LOG-005 TC-PI-001 TC-PI-003 TC-PI-005 TC-PRV-001 TC-PRV-002 TC-TEN-001 TC-TEN-002 TC-TEN-003 TC-VEN-001 TC-VEN-002 TC-VEN-003

Permissions

KeyChecked atScope
platform.files.uploadapitenant

Business Rules

8 rules, 8 to be proved before approval. A rule's product intent is derived from its origin: 8 confirmed by a product decision, the rest inheriting this capability's confirmed.

IdRuleKindEnforced atProvenance
01must prove
Confirmed
Upload issuance requires the upload permission, held by Platform Administrator and User but absent from Read Only; refusal issues nothing.
permissionapitest
services-platform:modules/files/tests/e2e/files.e2e.spec.js#is refused 403 by the dispatcher, and nothing is issued
02must prove
Confirmed
The signed caller context must include the workspace named in the route, and requests cannot substitute a workspace in the body or use another customer’s workspace.
permissionapi, servicetest
services-platform:modules/files/tests/e2e/files.e2e.spec.js#refuses a body that names a workspace of its own
03must prove
Confirmed
Upload size must be a positive whole byte count within ten mebibytes for images or twenty-five for files; oversized requests name the size problem without signing or recording an upload.
origin: services-platform:docs/milestones/PLAT-M10-image-and-file-fields.md#D4 (Andrew, 2026-10-19: 10 MiB / 25 MiB)
validationservicetest
services-platform:modules/files/tests/integration/services/uploads/issue-upload.integration.spec.js#refuses a picture over 10 MiB, naming size, and signs and records nothing
04must prove
Confirmed
Images permit JPEG, PNG, GIF and WebP but exclude SVG; files additionally permit supported document, text, spreadsheet and archive formats, while mismatched image types and executables are refused.
origin: services-platform:docs/milestones/plans/PLAT-M10-plan.md#4. Assumptions A7 (Andrew, 2026-10-08: SVG refused)
validationservicetest
services-platform:modules/files/tests/integration/services/uploads/issue-upload.integration.spec.js#refuses an SVG picture, naming content_type, and signs and records nothing
05must prove
Confirmed
Platform derives staging location from workspace, record-type folder, a fresh upload identifier and a safe filename, uses public staging for images and rejects filenames containing paths.
calculationservicetest
services-platform:modules/files/tests/unit/upload-keys.spec.ts#is tmp, the workspace, the object folder, a public- upload directory for a picture, and the file name
06must prove
Confirmed
The signed upload expires after fifteen minutes and binds declared type, length and uploader identity so storage rejects a changed declaration and saving can identify the uploader.
policyservicetest
services-platform:modules/files/tests/unit/upload-presign.spec.ts#signs the type, the length and both metadata headers, so S3 refuses a PUT that changes any
07must prove
Confirmed
Issuance records caller, object, field, location, type, size and expiry together with its security audit event.
policyservice, databasetest
services-platform:modules/files/tests/integration/services/uploads/issue-upload.integration.spec.js#appends one file_upload audit event naming who was given the upload and for what
08must prove
Confirmed
The owning save checks and copies uploaded or web-address files into managed storage and must refuse staging files issued to a different saving person.
origin: services-platform:docs/milestones/PLAT-M10-image-and-file-fields.md#D1 (Andrew, 2026-10-19: copy at save)
policyservicedocumented

Scenarios

IdGivenWhenThenProvenance
01A staff editor is selecting Ruth Kim contact photo.Request staging for a forty-eight-kilobyte JPEG.The response supplies an upload identity, expiring PUT address, required headers and save reference.test
services-platform:modules/files/tests/e2e/files.e2e.spec.js#answers a PUT upload with the headers and the staging reference of this workspace

Edge Cases

IdGivenWhenThenProvenance
02The caller has customer administrator permissions.Request an oversized image and an SVG upload.Both requests identify the size or media-type problem and issue nothing.test
services-platform:modules/files/tests/e2e/files.e2e.spec.js#is refused an SVG picture by its type, and nothing is issued

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.