[Art Studio][Backend] Artifact bundle/zip download endpoint (enables detail-screen "Download Zip") #398

Closed
opened 2026-07-05 15:38:26 +00:00 by spikerj · 1 comment
Owner

Epic #382. Surfaced by #388 (asset detail): the detail screen mirrors Eric's "Download Zip" (GLB + textures + previews as one bundle), but there is no backend bundle endpointArtStudioController only exposes single-artifact download. #388 correctly surfaces the button disabled with a tooltip rather than faking it.

Scope: add an endpoint that streams an asset's artifacts as a single archive. Because bundling reads multiple GridFS artifacts (potentially large) and zips them, do the zip in a worker per the worker-architecture rule (IRemoteCommandWorkers.*EventHandlers.*) rather than in Api, or stream directly if small; return a application/zip stream. Respect the asset's ownership/authorization (same guard as single-artifact download). Then flip #388's Download-Zip button from disabled → wired.

Deps: #388 (frontend button already present, disabled). Type: backend. Priority: low (convenience; single-artifact + GLB download already work). Test: endpoint returns a zip containing the expected artifact set for an owned asset; 403 for non-owner; empty/one-artifact edge cases.

Epic #382. Surfaced by #388 (asset detail): the detail screen mirrors Eric's "Download Zip" (GLB + textures + previews as one bundle), but there is **no backend bundle endpoint** — `ArtStudioController` only exposes single-artifact download. #388 correctly surfaces the button **disabled with a tooltip** rather than faking it. **Scope:** add an endpoint that streams an asset's artifacts as a single archive. Because bundling reads multiple GridFS artifacts (potentially large) and zips them, do the zip in a worker per the worker-architecture rule (`IRemoteCommand` → `Workers.*` → `EventHandlers.*`) rather than in Api, or stream directly if small; return a `application/zip` stream. Respect the asset's ownership/authorization (same guard as single-artifact download). Then flip #388's Download-Zip button from disabled → wired. **Deps:** #388 (frontend button already present, disabled). **Type:** backend. **Priority:** low (convenience; single-artifact + GLB download already work). **Test:** endpoint returns a zip containing the expected artifact set for an owned asset; 403 for non-owner; empty/one-artifact edge cases.
Author
Owner

Merged to master via spikersoft-backend#101. Artifact zip-bundle endpoint GET api/artstudio/{id}/bundle landed (streams GridFS artifacts as one archive; auth mirrors single-artifact download). Wired to the detail-screen Download-ZIP button in spikersoft-angular#132. Build 0 errors; 534 ArtStudio tests green.

✅ Merged to master via **spikersoft-backend#101**. Artifact zip-bundle endpoint `GET api/artstudio/{id}/bundle` landed (streams GridFS artifacts as one archive; auth mirrors single-artifact download). Wired to the detail-screen Download-ZIP button in spikersoft-angular#132. Build 0 errors; 534 ArtStudio tests green.
Sign in to join this conversation.