diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index fcee6f4..bb2a50f 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -7,9 +7,7 @@
-
-
@@ -44,33 +42,33 @@
- {
+ "keyToString": {
+ "DefaultGoTemplateProperty": "Go File",
+ "Go Build.Backend.executor": "Run",
+ "Go 构建.Backend.executor": "Run",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "RunOnceActivity.go.formatter.settings.were.checked": "true",
+ "RunOnceActivity.go.migrated.go.modules.settings": "true",
+ "RunOnceActivity.go.modules.automatic.dependencies.download": "true",
+ "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true",
+ "git-widget-placeholder": "master",
+ "go.import.settings.migrated": "true",
+ "go.sdk.automatically.set": "true",
+ "last_opened_file_path": "/Users/littlesheep/Documents/Projects/Hydrogen/Paperclip/pkg/internal/grpc",
+ "node.js.detected.package.eslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "run.code.analysis.last.selected.profile": "pProject Default",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "vue.rearranger.settings.migration": "true"
},
- "keyToStringList": {
- "DatabaseDriversLRU": [
- "postgresql"
+ "keyToStringList": {
+ "DatabaseDriversLRU": [
+ "postgresql"
]
}
-}]]>
+}
diff --git a/pkg/internal/server/api/up_multipart_api.go b/pkg/internal/server/api/up_multipart_api.go
index 46e9985..4b18a4f 100644
--- a/pkg/internal/server/api/up_multipart_api.go
+++ b/pkg/internal/server/api/up_multipart_api.go
@@ -117,7 +117,6 @@ func uploadAttachmentMultipart(c *fiber.Ctx) error {
}
if !isAllUploaded {
- database.C.Save(&meta)
return c.JSON(meta)
}
diff --git a/pkg/internal/services/merger.go b/pkg/internal/services/merger.go
index 4111eb7..cedea5d 100644
--- a/pkg/internal/services/merger.go
+++ b/pkg/internal/services/merger.go
@@ -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