prevent cache
All checks were successful
Build Images and Deploy / Update-PROD-Stack (push) Successful in 1m9s

This commit is contained in:
2026-02-09 22:20:16 -05:00
parent 24b0c07620
commit fa287261d0
2 changed files with 8 additions and 3 deletions

7
app.py
View File

@@ -221,7 +221,12 @@ def preview_video(file_id):
if not os.path.exists(output_path): if not os.path.exists(output_path):
return jsonify({'error': 'File not found'}), 404 return jsonify({'error': 'File not found'}), 404
return send_file(output_path, mimetype='video/mp4') response = send_file(output_path, mimetype='video/mp4')
# Prevent caching
response.headers['Cache-Control'] = 'no-store, no-cache, must-revalidate, max-age=0'
response.headers['Pragma'] = 'no-cache'
response.headers['Expires'] = '0'
return response
except Exception as e: except Exception as e:
return jsonify({'error': str(e)}), 500 return jsonify({'error': str(e)}), 500

View File

@@ -1253,9 +1253,9 @@
throw new Error(data.error || 'Processing failed'); throw new Error(data.error || 'Processing failed');
} }
// Load processed video preview // Load processed video preview with cache-busting
const processedVideoPreview = document.getElementById('processed-video-preview'); const processedVideoPreview = document.getElementById('processed-video-preview');
processedVideoPreview.src = `/preview/${currentFileId}`; processedVideoPreview.src = `/preview/${currentFileId}?t=${Date.now()}`;
// Show download section // Show download section
document.getElementById('edit-section').classList.add('hidden'); document.getElementById('edit-section').classList.add('hidden');