Skip to content

Commit 4c7d27f

Browse files
committed
better check
1 parent b4c7c1c commit 4c7d27f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ayon_api/server_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1661,7 +1661,10 @@ def _upload_file(
16611661
# Auto-fix missing 'api/'
16621662
if response.status_code == 405 and not api_prepended:
16631663
api_prepended = True
1664-
if not endpoint.startswith("api/"):
1664+
if (
1665+
not endpoint.startswith(self._base_url)
1666+
and not endpoint.startswith("api/")
1667+
):
16651668
url = self._endpoint_to_url(endpoint, use_rest=True)
16661669
progress.set_destination_url(url)
16671670
continue

0 commit comments

Comments
 (0)