From 8e49ef68e6f5204a1c32f08296b4d85e0477df04 Mon Sep 17 00:00:00 2001 From: jkoberg Date: Thu, 25 Jul 2024 10:24:22 +0200 Subject: [PATCH] fix(decomposedfs): dont postprocess 0 byte files Signed-off-by: jkoberg --- changelog/unreleased/zero-byte-uploads.md | 5 +++++ pkg/storage/utils/decomposedfs/upload/upload.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/zero-byte-uploads.md diff --git a/changelog/unreleased/zero-byte-uploads.md b/changelog/unreleased/zero-byte-uploads.md new file mode 100644 index 0000000000..d1ada78e11 --- /dev/null +++ b/changelog/unreleased/zero-byte-uploads.md @@ -0,0 +1,5 @@ +Bugfix: Zero byte uploads + +Zero byte uploads would trigger postprocessing which lead to breaking pipelines. + +https://github.com/cs3org/reva/pull/4778 diff --git a/pkg/storage/utils/decomposedfs/upload/upload.go b/pkg/storage/utils/decomposedfs/upload/upload.go index d540dbf142..92c9438f7e 100644 --- a/pkg/storage/utils/decomposedfs/upload/upload.go +++ b/pkg/storage/utils/decomposedfs/upload/upload.go @@ -171,7 +171,7 @@ func (session *OcisSession) FinishUpload(ctx context.Context) error { metrics.UploadProcessing.Inc() metrics.UploadSessionsBytesReceived.Inc() - if session.store.pub != nil { + if session.store.pub != nil && session.info.Size > 0 { u, _ := ctxpkg.ContextGetUser(ctx) s, err := session.URL(ctx) if err != nil {