diff --git a/changelog/unreleased/fix-owncloudsql-storage-no-mtime.md b/changelog/unreleased/fix-owncloudsql-storage-no-mtime.md new file mode 100644 index 0000000000..a034572c45 --- /dev/null +++ b/changelog/unreleased/fix-owncloudsql-storage-no-mtime.md @@ -0,0 +1,6 @@ +Bugfix: Fix uploads to owncloudsql storage when no mtime is provided + +We've fixed uploads to owncloudsql storage when no mtime is provided. +We now just use the current timestamp. Previously the upload did fail. + +https://github.com/cs3org/reva/pull/2831 diff --git a/pkg/storage/fs/owncloudsql/upload.go b/pkg/storage/fs/owncloudsql/upload.go index bece39e4d5..ace1688246 100644 --- a/pkg/storage/fs/owncloudsql/upload.go +++ b/pkg/storage/fs/owncloudsql/upload.go @@ -27,6 +27,7 @@ import ( "os" "path/filepath" "strconv" + "time" userpb "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1" provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1" @@ -100,6 +101,7 @@ func (fs *owncloudsqlfs) InitiateUpload(ctx context.Context, ref *provider.Refer MetaData: tusd.MetaData{ "filename": filepath.Base(p), "dir": filepath.Dir(p), + "mtime": strconv.FormatInt(time.Now().Unix(), 10), }, Size: uploadLength, }