Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
PlusOne committed Dec 31, 2024
1 parent 808250d commit 79a5095
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cmd/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 79a5095

Please sign in to comment.