✨ Able to analyze right now
This commit is contained in:
parent
790b123410
commit
044b0eefca
@ -66,7 +66,12 @@ func createAttachmentDirectly(c *fiber.Ctx) error {
|
||||
tx.Commit()
|
||||
|
||||
metadata.Pool = &pool
|
||||
|
||||
if !c.QueryBool("analyzeNow", false) {
|
||||
services.AnalyzeAttachment(metadata)
|
||||
} else {
|
||||
services.PublishAnalyzeTask(metadata)
|
||||
}
|
||||
|
||||
return c.JSON(metadata)
|
||||
}
|
||||
|
@ -113,9 +113,14 @@ func uploadAttachmentMultipart(c *fiber.Ctx) error {
|
||||
return c.JSON(meta)
|
||||
}
|
||||
|
||||
if meta, err = services.MergeFileChunks(meta, chunkArrange); err != nil {
|
||||
meta, err = services.MergeFileChunks(meta, chunkArrange)
|
||||
if err != nil {
|
||||
return fiber.NewError(fiber.StatusInternalServerError, err.Error())
|
||||
} else if !c.QueryBool("analyzeNow", false) {
|
||||
services.AnalyzeAttachment(meta)
|
||||
} else {
|
||||
return c.JSON(meta)
|
||||
services.PublishAnalyzeTask(meta)
|
||||
}
|
||||
|
||||
return c.JSON(meta)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user