yxqo41main commited on
Commit
7e7cce9
·
verified ·
1 Parent(s): 8ffd378

Upload main.py

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -307,7 +307,7 @@ async def get_reciter_audio(reciter_name: str, recitation_type: str, surah_numbe
307
  # Return a StreamingResponse
308
  return StreamingResponse(response.iter_content(chunk_size=8192),
309
  media_type=response.headers.get('Content-Type', 'audio/mpeg'),
310
- headers={"Content-Disposition": f"attachment; filename="{surah_str_padded}.mp3""})
311
  except requests.exceptions.RequestException as e:
312
  print(f"Failed to fetch from HF CDN: {e}")
313
  # Fall through to 404 if HF CDN also fails
 
307
  # Return a StreamingResponse
308
  return StreamingResponse(response.iter_content(chunk_size=8192),
309
  media_type=response.headers.get('Content-Type', 'audio/mpeg'),
310
+ headers={"Content-Disposition": f"attachment; filename='{surah_str_padded}.mp3'"})
311
  except requests.exceptions.RequestException as e:
312
  print(f"Failed to fetch from HF CDN: {e}")
313
  # Fall through to 404 if HF CDN also fails