refactor(downloader): update download_to_memory calls to include response headers

This commit is contained in:
Will Miao
2025-09-15 19:24:09 +08:00
parent 6f9245df01
commit 86074c87d7
3 changed files with 3 additions and 3 deletions

View File

@@ -94,7 +94,7 @@ class CivitaiClient:
async def download_preview_image(self, image_url: str, save_path: str):
try:
downloader = await get_downloader()
success, content = await downloader.download_to_memory(
success, content, headers = await downloader.download_to_memory(
image_url,
use_auth=False # Preview images don't need auth
)

View File

@@ -463,7 +463,7 @@ class DownloadManager:
# Download the original image to temp path using downloader
downloader = await get_downloader()
success, content = await downloader.download_to_memory(
success, content, headers = await downloader.download_to_memory(
images[0]['url'],
use_auth=False
)

View File

@@ -141,7 +141,7 @@ class ModelRouteUtils:
else:
# For images, download and then optimize to WebP using downloader
downloader = await get_downloader()
success, content = await downloader.download_to_memory(
success, content, headers = await downloader.download_to_memory(
first_preview['url'],
use_auth=False
)