diff --git a/pkg/internal/server/api/up_direct_api.go b/pkg/internal/server/api/up_direct_api.go index feafcd8..5fa8eda 100644 --- a/pkg/internal/server/api/up_direct_api.go +++ b/pkg/internal/server/api/up_direct_api.go @@ -66,7 +66,7 @@ func createAttachmentDirectly(c *fiber.Ctx) error { metadata.Pool = &pool - if !c.QueryBool("analyzeNow", false) { + if c.QueryBool("analyzeNow", false) { services.AnalyzeAttachment(metadata) } else { services.PublishAnalyzeTask(metadata) diff --git a/pkg/internal/server/api/up_multipart_api.go b/pkg/internal/server/api/up_multipart_api.go index 819e0a9..e27d082 100644 --- a/pkg/internal/server/api/up_multipart_api.go +++ b/pkg/internal/server/api/up_multipart_api.go @@ -130,7 +130,7 @@ func uploadFragmentChunk(c *fiber.Ctx) error { return fiber.NewError(fiber.StatusInternalServerError, err.Error()) } - if !c.QueryBool("analyzeNow", false) { + if c.QueryBool("analyzeNow", false) { services.AnalyzeAttachment(attachment) } else { services.PublishAnalyzeTask(attachment)