🐛 Fix merged file isn't add to cache
This commit is contained in:
@ -117,7 +117,6 @@ func uploadAttachmentMultipart(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
if !isAllUploaded {
|
||||
database.C.Save(&meta)
|
||||
return c.JSON(meta)
|
||||
}
|
||||
|
||||
|
@ -44,8 +44,10 @@ func MergeFileChunks(meta models.Attachment, arrange []string) (models.Attachmen
|
||||
|
||||
// Do post-upload tasks
|
||||
meta.IsUploaded = true
|
||||
meta.FileChunks = nil
|
||||
database.C.Save(&meta)
|
||||
|
||||
CacheAttachment(meta)
|
||||
PublishAnalyzeTask(meta)
|
||||
|
||||
// Clean up
|
||||
|
Reference in New Issue
Block a user