diff --git a/pkg/internal/server/api/up_multipart_api.go b/pkg/internal/server/api/up_multipart_api.go index e7ccfeb..ce2b902 100644 --- a/pkg/internal/server/api/up_multipart_api.go +++ b/pkg/internal/server/api/up_multipart_api.go @@ -113,7 +113,10 @@ func uploadFragmentChunk(c *fiber.Ctx) error { } if !isAllUploaded { - return c.JSON(meta) + return c.JSON(fiber.Map{ + "is_finished": false, + "fragment": meta, + }) } // Merge & post-upload @@ -134,5 +137,8 @@ func uploadFragmentChunk(c *fiber.Ctx) error { services.PublishAnalyzeTask(attachment) } - return c.JSON(meta) + return c.JSON(fiber.Map{ + "is_finished": true, + "attachment": attachment, + }) }