Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Content-Range support to the PUT api/worker/objects/:key Endpoint #1165

Closed
daniel-lucio opened this issue Apr 14, 2024 · 1 comment
Closed

Comments

@daniel-lucio
Copy link

Description

When doing an API call like this:
PUT /api/worker/objects%2F1536-f.txt?bucket=default HTTP/1.1

and passing headers like this:

Content-Length: 2477
Content-Type: application/octet-stream
Content-Range: bytes 4096-6573/

the renterd API should honour and accept the Range. Currently, it ignores it and when sending a file in 2 ranges, the second range overwrites the first one.

This would make easier the coding for the siafs (grant). Also, it is a good idea to keep the API to honour the HTTP headers when dealing with files.

Version

v1.0.6

What operating system are you running (e.g. Ubuntu 22.04, macOS, Windows 11)?

Linux

Anything else?

RFC: https://datatracker.ietf.org/doc/html/rfc7233#section-4.2

Log:

> PUT /api/worker/objects/1536-f.txt?bucket=default HTTP/1.1
Host: 192.168.7.52:9880
Authorization: Basic OXXXXXXX==
Accept: */*
Content-Length: 2477
Content-Type: application/octet-stream
Content-Range: bytes 4096-6573/*
@github-project-automation github-project-automation bot moved this to Triage in Sia Apr 14, 2024
@ChrisSchinnerl
Copy link
Member

Sia in its current state doesn't support updating ranges of files and therefore ignores the Content-Range header.
For uploading an object in chunks you can use the multipart API but updating already uploaded objects isn't currently on our roadmap.

@ChrisSchinnerl ChrisSchinnerl removed this from Sia Apr 15, 2024
@ChrisSchinnerl ChrisSchinnerl closed this as not planned Won't fix, can't repro, duplicate, stale Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants