fix: split workbench core mysql access

This commit is contained in:
richjohnrambo
2026-10-07 14:38:56 +08:00
parent 8d32376de8
commit c13fb72849
8 changed files with 237 additions and 5 deletions
+5 -1
View File
@@ -396,7 +396,11 @@ func (s *Store) SaveCompletedFileUpload(ctx context.Context, file CompletedFileU
if now.IsZero() {
now = time.Now().UTC().Round(time.Millisecond)
}
_, err := s.db.ExecContext(ctx, `INSERT INTO im_fileuploads
db := s.db
if s.core != nil && s.core.db != nil {
db = s.core.db
}
_, err := db.ExecContext(ctx, `INSERT INTO im_fileuploads
(tenant_id,id,createdat,updatedat,userid,status,mimetype,size,etag,location)
VALUES(?,?,?,?,?,?,?,?,?,?)`,
s.tenant(), file.ID, now, now, formatInt64(file.UserID), 1, file.MIMEType, file.Size, file.ETag, file.Location)