We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 39680f9 commit 745d356Copy full SHA for 745d356
ayon_api/server_api.py
@@ -1368,7 +1368,6 @@ def _download_file_to_stream(
1368
get_func = self._session_functions_mapping[RequestTypes.get]
1369
1370
retries = self.get_default_max_retries()
1371
- content_size_set = False
1372
for attempt in range(retries):
1373
# Continue in download
1374
offset = progress.get_transferred_size()
@@ -1378,8 +1377,7 @@ def _download_file_to_stream(
1378
1377
try:
1379
with get_func(url, **kwargs) as response:
1380
response.raise_for_status()
1381
- if not content_size_set:
1382
- content_size_set = True
+ if progress.get_content_size() is None:
1383
progress.set_content_size(
1384
response.headers["Content-length"]
1385
)
0 commit comments