[#354] Support of presigned url methods for S3

Signed-off-by: Yaroslava Lukoyanova <y.lukoyanova@yadro.com>
This commit is contained in:
Yaroslava Lukoyanova 2025-02-03 12:44:21 +03:00 committed by ylukoyan
parent c4ab14fce8
commit d38808a1f5
4 changed files with 34 additions and 1 deletions

View file

@ -33,6 +33,7 @@ def get_via_http_gate(
oid: str,
node: ClusterNode,
request_path: Optional[str] = None,
presigned_url: Optional[str] = None,
timeout: Optional[int] = 300,
):
"""
@ -47,6 +48,9 @@ def get_via_http_gate(
if request_path:
request = f"{node.http_gate.get_endpoint()}{request_path}"
if presigned_url:
request = presigned_url
response = requests.get(request, stream=True, timeout=timeout, verify=False)
if not response.ok: