Product pictures in the store: one picture per product project (for the Prüfwerk Lieferkette) #140

Open
opened 2026-11-19 09:58:26 +00:00 by sharang · 0 comments
Owner

Prüfwerk's Lieferkette (platform/pruefwerk#1050, #1054) shows a workspace's products and assemblies as boxes, and each box shows the product's description and its documents from the Dokumentenablage. The user decided on 2026-11-19 that these files live in the Dokumentenablage.

The gap: a box should also show a picture of the product, and the store takes only PDF, DOCX, TXT and HTML (unsupported_type otherwise).

Asked for

  • Storing: one picture per product project (any level: family, product, assembly), stored like the other store files: hashed, served only after the digest matches, and covered by the tenant export and erasure.
    • Types: PNG, JPEG or WebP.
    • Size: at most 5 MB (the user's limit).
    • Validation: checked by content, not by name. Images are not processed further.
  • API (sketch):
    • PUT /v1/tenants/{id}/projects/{project}/picture (multipart file) replaces the picture.
    • DELETE removes it.
    • GET serves it, digest-checked.
    • GET /v1/tenants/{id}/projects gives each project a picture (sha, content type, size) when it has one.
    • The portal uploads for tenant admins as it does for documents, and products read the picture with their service token.
  • Portal: setting and removing the picture on a project. A small issue in platform/portal once this API exists.

Done when

  • A product project carries one picture of at most 5 MB, of type PNG, JPEG or WebP, and anything else is refused.
  • The project list says which projects have a picture, and a product can read it with its service token.
  • Tenant export and erasure cover the picture.
Prüfwerk's Lieferkette (platform/pruefwerk#1050, #1054) shows a workspace's products and assemblies as boxes, and each box shows the product's description and its documents from the Dokumentenablage. The user decided on 2026-11-19 that these files live in the Dokumentenablage. **The gap:** a box should also show **a picture of the product**, and the store takes only PDF, DOCX, TXT and HTML (`unsupported_type` otherwise). ## Asked for - **Storing:** one picture per product project (any level: family, product, assembly), stored like the other store files: hashed, served only after the digest matches, and covered by the tenant export and erasure. - **Types:** PNG, JPEG or WebP. - **Size:** at most **5 MB** (the user's limit). - **Validation:** checked by content, not by name. Images are not processed further. - **API (sketch):** - `PUT /v1/tenants/{id}/projects/{project}/picture` (multipart `file`) replaces the picture. - `DELETE` removes it. - `GET` serves it, digest-checked. - `GET /v1/tenants/{id}/projects` gives each project a `picture` (sha, content type, size) when it has one. - The portal uploads for tenant admins as it does for documents, and products read the picture with their service token. - **Portal:** setting and removing the picture on a project. A small issue in platform/portal once this API exists. ## Done when - [ ] A product project carries one picture of at most 5 MB, of type PNG, JPEG or WebP, and anything else is refused. - [ ] The project list says which projects have a picture, and a product can read it with its service token. - [ ] Tenant export and erasure cover the picture.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/tenant-registry#140