fix: split workbench core mysql access
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user