openeo-python-client icon indicating copy to clipboard operation
openeo-python-client copied to clipboard

747 robustranged download support

Open dsamaey opened this issue 9 months ago • 1 comments

Manually tested with https://openeo.dataspace.copernicus.eu/openeo/1.2/jobs/j-2504020555234b3287f2fe696bea5ded/results/assets/MzJjYzdkZGItZjdlMS00YjFjLTk3OTYtZjlmZTM5Y2I4ZmVi/efc6009b1fdb1d283b91e65538400aac/feature-datacubes_v1_feature-cube_year2024_E412N322.tif?expires=1744207076

Chunks are directly written to the file since all chunks are downloaded (and retried) sequentially.

dsamaey avatar Apr 07 '25 14:04 dsamaey

@soxofaan ok to merge? Broken downloads is a big issue for many users, and this might really help quite a bit.

jdries avatar May 06 '25 19:05 jdries

@dsamaey indeed, for the 'download all at once' code path, we can just make sure to use what was already there, and then this should be fine:

response = self._get_response(stream=True)
with target.open("wb") as f:
    for block in response.iter_content(chunk_size=chunk_size):
        f.write(block)

Can you merge that in?

jdries avatar May 12 '25 09:05 jdries