fix: video size error handling — validation, timeouts, failure surfacing
Backend: - Increase ffmpeg/ffprobe timeouts from 15s to 60s for large videos - Classify processing errors (timeout, OOM, corrupt) with user-facing messages - Emit failure details via media:job:update socket event (error field) - Bump refboard container memory 512M → 1G Frontend: - Client-side file size validation (200MB) before upload starts - Oversized files show immediate error in upload manager, skip upload - Handle media:job:update status='failed' — surface error in upload panel - Add processingFailed() to UploadManager for video processing errors
This commit is contained in:
@@ -184,10 +184,18 @@ export function useCanvasSetup(deps: CanvasSetupDeps) {
|
||||
|
||||
// Media processing pipeline: upgrade videos when poster/metadata arrives
|
||||
socket.on('media:job:update', (data: any) => {
|
||||
if (!data || data.status !== 'done') return;
|
||||
const { imageId, posterAssetKey, nativeWidth, nativeHeight, duration } = data;
|
||||
if (!data) return;
|
||||
const { imageId, status } = data;
|
||||
if (!imageId) return;
|
||||
|
||||
// Surface processing failures to upload manager
|
||||
if (status === 'failed') {
|
||||
uploadManager.processingFailed(imageId, data.error || 'Video processing failed');
|
||||
return;
|
||||
}
|
||||
if (status !== 'done') return;
|
||||
const { posterAssetKey, nativeWidth, nativeHeight, duration } = data;
|
||||
|
||||
// Update upload manager — transitions video jobs from "processing" to "done"
|
||||
uploadManager.processingComplete(imageId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user