Speakr is a personal, self-hosted web application designed for transcribing audio recordings
Python
fix: note Flask 3.1 floor on max_content_length assignment and resolve recovery-enqueue params from the existing recording (PR #347 follow-up)
Murtaza Nasirfb891fb6d544
diff --git a/src/api/api_v1.py b/src/api/api_v1.pyindex 27f3fdfd..a319d826 100644--- a/src/api/api_v1.py+++ b/src/api/api_v1.py@@ -2952,6 +2952,10 @@ def upload_from_asr_voice_recorder():# headers and metadata around a file at the configured limit.from src.models import SystemSettingregular_limit_mb = max(1, int(SystemSetting.get_setting('max_file_size_mb', 250)))+ # Assigning request.max_content_length requires Flask >= 3.1 /+ # Werkzeug >= 3.1 (older versions expose it as a read-only property+ # and this line raises AttributeError, 500ing every upload).+ # requirements.txt pins flask==3.1.0 / werkzeug==3.1.3.request.max_content_length = regular_limit_mb * 1024 * 1024 + 64 * 1024secret = request.form.get('secret', '')diff --git a/src/api/recordings.py b/src/api/recordings.pyindex caf2ff83..60edaee3 100644--- a/src/api/recordings.py+++ b/src/api/recordings.py@@ -2543,7 +2543,10 @@ def ingest_uploaded_recording(job_type='transcribe',).first()if existing.status in ('PENDING', 'QUEUED') and existing_job is None:- recovery_params = resolve_transcription_params(owner=owner)+ # Resolve from the existing recording (tags/folder aware), not+ # just the owner: equivalent for ASR-sourced recordings today,+ # but robust if another caller ever reuses this recovery path.+ recovery_params = resolve_transcription_params(existing)job_queue.enqueue(user_id=owner.id,recording_id=existing.id,