[bum reva] Fix 0-byte file uploads

This commit is contained in:
Roman Perekhod
2024-11-07 10:44:04 +01:00
parent 75cba423c2
commit 2c0a593406
7 changed files with 18 additions and 8 deletions

View File

@@ -1,4 +1,9 @@
Enhancement: Bump reva to 2.26.3
Enhancement: Bump reva to 2.26.4
* Bugfix [cs3org/reva#4917](https://github.com/cs3org/reva/pull/4917): Fix 0-byte file uploads
* Bugfix [cs3org/reva#4918](https://github.com/cs3org/reva/pull/4918): Fix app templates
Bump reva to 2.26.3
* Bugfix [cs3org/reva#4908](https://github.com/cs3org/reva/pull/4908): Add checksum to OCM storageprovider responses
* Enhancement [cs3org/reva#4910](https://github.com/cs3org/reva/pull/4910): Bump cs3api

View File

@@ -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/owncloud/ocis/pull/10500
https://github.com/owncloud/ocis/issues/10469

2
go.mod
View File

@@ -15,7 +15,7 @@ require (
github.com/cenkalti/backoff v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.11.0
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1
github.com/cs3org/reva/v2 v2.26.3
github.com/cs3org/reva/v2 v2.26.4
github.com/davidbyttow/govips/v2 v2.15.0
github.com/dhowden/tag v0.0.0-20240417053706-3d75831295e8
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e

6
go.sum
View File

@@ -255,10 +255,8 @@ github.com/crewjam/saml v0.4.14 h1:g9FBNx62osKusnFzs3QTN5L9CVA/Egfgm+stJShzw/c=
github.com/crewjam/saml v0.4.14/go.mod h1:UVSZCf18jJkk6GpWNVqcyQJMD5HsRugBPf4I1nl2mME=
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1 h1:RU6LT6mkD16xZs011+8foU7T3LrPvTTSWeTQ9OgfhkA=
github.com/cs3org/go-cs3apis v0.0.0-20241105092511-3ad35d174fc1/go.mod h1:DedpcqXl193qF/08Y04IO0PpxyyMu8+GrkD6kWK2MEQ=
github.com/cs3org/reva/v2 v2.26.3-0.20241105095836-b7d7c42e082a h1:G6xC0mccLdY4ppL7RG21hPkMR2c7hnPIcmERvevFP5E=
github.com/cs3org/reva/v2 v2.26.3-0.20241105095836-b7d7c42e082a/go.mod h1:KP0Zomt3dNIr/kU2M1mXzTIVFOtxBVS4qmBDMRCfrOQ=
github.com/cs3org/reva/v2 v2.26.3 h1:zF3ZMl/ZidrdI6ZZ0zEDVqTLr+DvegpgS7E5kdTlGF8=
github.com/cs3org/reva/v2 v2.26.3/go.mod h1:KP0Zomt3dNIr/kU2M1mXzTIVFOtxBVS4qmBDMRCfrOQ=
github.com/cs3org/reva/v2 v2.26.4 h1:wUmNSkXglIHrn+yxwJtHDvlSzxadFPANENGnwmG+5wI=
github.com/cs3org/reva/v2 v2.26.4/go.mod h1:KP0Zomt3dNIr/kU2M1mXzTIVFOtxBVS4qmBDMRCfrOQ=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg=
github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4=

View File

@@ -75,7 +75,7 @@ var tl = TemplateList{
func addTemplateInfo(mt *appregistry.MimeTypeInfo, apps []*ProviderInfo) {
for _, app := range apps {
if tls, ok := tl.Templates[strings.ToLower(app.Name)]; ok {
if tls, ok := tl.Templates[strings.ToLower(app.ProductName)]; ok {
for _, tmpl := range tls {
if tmpl.Extension != "" && tmpl.Extension == mt.Ext {
app.TargetExt = tmpl.TargetExtension

View File

@@ -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:

2
vendor/modules.txt vendored
View File

@@ -367,7 +367,7 @@ github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1
github.com/cs3org/go-cs3apis/cs3/storage/registry/v1beta1
github.com/cs3org/go-cs3apis/cs3/tx/v1beta1
github.com/cs3org/go-cs3apis/cs3/types/v1beta1
# github.com/cs3org/reva/v2 v2.26.3
# github.com/cs3org/reva/v2 v2.26.4
## explicit; go 1.22.0
github.com/cs3org/reva/v2/cmd/revad/internal/grace
github.com/cs3org/reva/v2/cmd/revad/runtime