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

Fix 0-byte file uploads #4917

Merged
merged 1 commit into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/unreleased/fix-0-byte-upload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Fix 0-byte file uploads

We fixed an issue where 0-byte files upload did not return the Location header.

https://github.com/cs3org/reva/pull/4917
https://github.com/owncloud/ocis/issues/10469
1 change: 1 addition & 0 deletions internal/http/services/owncloud/ocdav/tus.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ func (s *svc) handleTusPost(ctx context.Context, w http.ResponseWriter, r *http.
}
switch tfRes.Status.Code {
case rpc.Code_CODE_OK:
w.Header().Set(net.HeaderLocation, "")
w.WriteHeader(http.StatusCreated)
return
case rpc.Code_CODE_ALREADY_EXISTS:
Expand Down
Loading