Files
aigen/shared/studio2/upload.mjs
T

9 lines
429 B
JavaScript

export function applyUploadedStill(form, response, target) {
const still=response?.still
if (!still?.id) throw new Error('The upload did not return a saved still. Please try again.')
const next={...form,settings:{...form.settings}}
if (target==='hero') next.identityStillId=still.id
else {next.imageAId=still.id;next.startClipId='';if(next.mode==='extend')next.mode='video';next.settings.aspect='auto'}
return next
}