- Use API response imageId instead of locally generated ID in
saveVideoAndGetRef/saveAudioAndGetRef (filename mismatch)
- Read result.video/result.audio instead of result.data in
loadMediaById (response field mismatch)
- Add audio extensions and MIME types to load-generation route
so audio files can be found and served
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Critical bug fix - the mediaStorage.ts functions were using incorrect
parameter names when calling the save-generation and load-generation APIs.
Fixed parameter mappings:
- workflowPath → directoryPath (API expects this name)
- id → imageId (API expects this name)
- data + type → video/audio (API expects media in named fields)
- Changed load from GET to POST with correct body structure
Also increased serverActions bodySizeLimit from 50mb to 100mb to handle
large video files during externalization.
This fixes the save failures when externalizing workflows with videos/audio.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Convert null to undefined when assigning to optional ref fields
to satisfy TypeScript type constraints.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>