Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ayon_api/server_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,10 @@ def _download_file_to_stream(
try:
with get_func(url, **kwargs) as response:
# Auto-fix missing 'api/'
if response.status_code == 405 and not api_prepended:
if (
response.status_code in (404, 405)
and not api_prepended
):
api_prepended = True
if (
not endpoint.startswith(self._base_url)
Expand Down Expand Up @@ -1841,7 +1844,7 @@ def _upload_file(
**kwargs
)
# Auto-fix missing 'api/'
if response.status_code == 405 and not api_prepended:
if response.status_code in (404, 405) and not api_prepended:
api_prepended = True
if (
not endpoint.startswith(self._base_url)
Expand Down
Loading