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

feat: supports resumable uploads #343

Merged
merged 10 commits into from
Jan 11, 2024
Merged

feat: supports resumable uploads #343

merged 10 commits into from
Jan 11, 2024

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Jan 10, 2024

HTTP PATCH support https://sabre.io/dav/http-patch/

upload_offset=$(curl -I -s http://127.0.0.1:5000/file | tr -d '\r' | sed -n 's/content-length: //p')
dd skip=$upload_offset if=file status=none ibs=1 | \
  curl -X PATCH -H "X-Update-Range: append" --data-binary @- http://127.0.0.1:5000/file

close #335

@sigoden sigoden changed the title feat: supports resumable upload feat: supports resumable uploads Jan 10, 2024
 Using Content-Range for PUT is explicitly forbidden by the HTTP standard, and a really bad idea.
 https://www.rfc-editor.org/rfc/rfc7231#section-4.3.4
@sigoden
Copy link
Owner Author

sigoden commented Jan 11, 2024

webui:

dufs-retry.mp4

@sigoden sigoden merged commit ee21894 into main Jan 11, 2024
3 checks passed
@sigoden sigoden deleted the feat-resume-upload branch January 11, 2024 06:56
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

Successfully merging this pull request may close these issues.

Support resumable/partial uploads (PUT/PATCH)
1 participant