28 lines
3.2 KiB
Markdown
28 lines
3.2 KiB
Markdown
# File uploads, images and asset lifecycle
|
|
|
|
Scope: common/user upload URL generation, authorized contexts, object storage, claiming references and replaced/deleted assets on profiles/products/tags/stores/banners/complaints. Use staging storage only.
|
|
|
|
| ID | Priority | Action / input | Expected result |
|
|
|---|---|---|---|
|
|
| UPLOAD-01 | P1 | Generate permitted URL, upload valid image, save owner record. | Asset exists and is claimed exactly by intended entity; visible image. |
|
|
| UPLOAD-02 | P1 | Multiple images/variants, replace one and retain owned keys. | Correct ordering/ownership; other images not removed. |
|
|
| UPLOAD-03 | P1 | Supported MIME/extensions and platform image picker. | Uploaded content/reference coherent; cancellation makes no entity mutation. |
|
|
| UPLOAD-04 | P0 | Unauthorized context or another user's/staff image key. | Ownership/scope denied before row changes. |
|
|
| UPLOAD-05 | P1 | Missing/expired/forged signed URL or upload never completed. | Save fails clearly; no half-created entity or false image claim. |
|
|
| UPLOAD-06 | P0 | Valid first image and invalid second image in product/tag/profile save. | Failure leaves no partial creation/update; old assets preserved. |
|
|
| UPLOAD-07 | P1 | Re-send current entity's existing asset key on unrelated edit. | No reupload required; not falsely rejected as already claimed. |
|
|
| UPLOAD-08 | P1 | Key vs full URL vs already-prefixed URL/query-string URL. | Supported normalization once; no double prefix/%3F malformed asset path. |
|
|
| UPLOAD-09 | P0 | Path traversal/external arbitrary URL/unsupported scheme. | Cannot claim/delete another storage object or publish unsafe asset reference. |
|
|
| UPLOAD-10 | P1 | Empty/oversized/corrupt/non-image content with image MIME. | Approved size/content validation; no broken published success. |
|
|
| UPLOAD-11 | P1 | Concurrent claim of same pending key. | Defined single-owner/no theft; rejected entity not half-created. |
|
|
| UPLOAD-12 | P1 | Replacement cleanup fails after successful save. | New asset persists; old cleanup retry/logging does not undo valid record. |
|
|
| UPLOAD-13 | P1 | Delete entity whose asset key missing/malformed. | Defined safe delete; missing storage object not permanently blocking DB cleanup. |
|
|
| UPLOAD-14 | P1 | Upload succeeds, form cancelled or save fails. | Unclaimed asset cleanup policy; no unrelated entity claims. |
|
|
| UPLOAD-15 | P1 | Slow upload/offline/retry/background/rotation. | Progress/errors recover; no duplicate owner attachment. |
|
|
| UPLOAD-16 | P2 | Browser CORS/signed headers and native content URI. | Supported platform transfer; no locally valid but server-unusable reference. |
|
|
| UPLOAD-17 | P0 | Delete/reuse image shared by historical data or sibling variant. | No unintended image disappearance; ownership/reference policy enforced. |
|
|
| UPLOAD-18 | P1 | Public fetch caching after image replacement. | Correct new image inside deadline, safe key/version behavior. |
|
|
| UPLOAD-19 | P0 | Upload errors/logs expose signing key/credential. | Secrets never included in client/report logs. |
|
|
| UPLOAD-20 | P1 | Batch URL generation fails midway. | Explicit outcome/pending cleanup; no falsely returned unusable URL list. |
|
|
|
|
Size limits/content sniffing and shared-reference retention must be specified before marking policy cases PASS.
|