노래 다운로드 완성
parent
c65a1dac74
commit
b59139dfaf
|
|
@ -321,7 +321,8 @@ async def download_song(
|
||||||
response = await client.get(stream_audio_url, timeout=60.0)
|
response = await client.get(stream_audio_url, timeout=60.0)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
async with aiofiles.open(file_path, "wb") as f:
|
# aiofiles는 Path 객체를 문자열로 변환하여 사용
|
||||||
|
async with aiofiles.open(str(file_path), "wb") as f:
|
||||||
await f.write(response.content)
|
await f.write(response.content)
|
||||||
|
|
||||||
# 프론트엔드에서 접근 가능한 URL 생성
|
# 프론트엔드에서 접근 가능한 URL 생성
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue