fix: persist multipart uploads as durable jobs
This commit is contained in:
parent
aa9638f6b3
commit
9dd5f386ce
6 changed files with 54 additions and 2 deletions
|
|
@ -126,6 +126,12 @@ def abort_multipart(key: str, upload_id: str) -> None:
|
|||
pass
|
||||
|
||||
|
||||
def list_multipart_parts(key: str, upload_id: str) -> list[dict]:
|
||||
s = get_settings()
|
||||
response = _client().list_parts(Bucket=s.r2_bucket, Key=key, UploadId=upload_id)
|
||||
return response.get("Parts", [])
|
||||
|
||||
|
||||
def download_to_file(key: str, dest_path: str, chunk_bytes: int = 8 * 1024 * 1024) -> int:
|
||||
"""Stream an object to disk (GB-scale safe, bounded RAM). Returns bytes."""
|
||||
s = get_settings()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue