previews and back to edit button
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m12s

This commit is contained in:
2026-02-09 21:53:52 -05:00
parent 89e8c88a15
commit 640582df33
2 changed files with 46 additions and 6 deletions

14
app.py
View File

@@ -211,6 +211,20 @@ def download_video(file_id):
except Exception as e:
return jsonify({'error': str(e)}), 500
@app.route('/preview/<file_id>')
def preview_video(file_id):
"""Serve processed video for inline preview"""
try:
output_filename = f"{file_id}_processed.mp4"
output_path = os.path.join(app.config['OUTPUT_FOLDER'], output_filename)
if not os.path.exists(output_path):
return jsonify({'error': 'File not found'}), 404
return send_file(output_path, mimetype='video/mp4')
except Exception as e:
return jsonify({'error': str(e)}), 500
@app.route('/cleanup/<file_id>', methods=['DELETE'])
def cleanup_files(file_id):
"""Clean up uploaded and processed files"""