Keep pause across Coolify restarts, apply the chosen still from the image picker, and remux clips with Range/faststart so finished video can be scrubbed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-28 08:15:52 -05:00
co-authored by Cursor
parent 870150f052
commit 7d783bd97e
12 changed files with 338 additions and 49 deletions
+6 -4
View File
@@ -1,3 +1,5 @@
import { sendBufferWithRange } from '~/server/utils/httpRange'
export default defineEventHandler(async (event) => {
const query = getQuery(event)
const filename = String(query.filename || '')
@@ -12,8 +14,8 @@ export default defineEventHandler(async (event) => {
throw createError({ statusCode: res.status, statusMessage: 'Failed to fetch video from ComfyUI' })
}
const buf = Buffer.from(await res.arrayBuffer())
setHeader(event, 'Content-Type', res.headers.get('content-type') || 'video/mp4')
setHeader(event, 'Content-Disposition', `inline; filename="${filename}"`)
setHeader(event, 'Cache-Control', 'private, max-age=3600')
return buf
return sendBufferWithRange(event, buf, res.headers.get('content-type') || 'video/mp4', {
'Content-Disposition': `inline; filename="${filename}"`,
'Cache-Control': 'private, max-age=0, must-revalidate'
})
})