From 79a50956d674ceddeb378d2b247d3ec4af9d974e Mon Sep 17 00:00:00 2001 From: Alexander Renz Date: Tue, 31 Dec 2024 11:01:32 +0100 Subject: [PATCH] ok --- cmd/server/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/server/main.go b/cmd/server/main.go index 6b9bb55..b65f032 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -1508,6 +1508,14 @@ func processUpload(task UploadTask) error { } } + // Generate thumbnail after deduplication + thumbnailDir := conf.Thumbnails.Directory + err = generateThumbnail(task.AbsFilename, thumbnailDir, conf.Thumbnails.Size) + if err != nil { + log.Errorf("Thumbnail generation failed for %s: %v", task.AbsFilename, err) + return err // Return early to avoid logging processing completion + } + log.WithFields(logrus.Fields{"file": absFilename}).Info("File uploaded and processed successfully") uploadDuration.Observe(time.Since(startTime).Seconds())