[#6689] updated to automatically routes raw write SQL statements to the nonconcurrent db pool

This commit is contained in:
Gani Georgiev
2025-05-02 10:27:41 +03:00
parent 3ef752c232
commit 836fc77ddc
27 changed files with 4601 additions and 3917 deletions
+4 -1
View File
@@ -112,6 +112,8 @@ func (s *System) Attributes(fileKey string) (*blob.Attributes, error) {
// NB! Make sure to call Close() on the file after you are done working with it.
//
// If the file doesn't exist returns ErrNotFound.
//
// @todo consider renaming to GetFileReader to avoid the confusion with filesystem.File
func (s *System) GetFile(fileKey string) (*blob.Reader, error) {
return s.bucket.NewReader(s.ctx, fileKey)
}
@@ -241,7 +243,8 @@ func (s *System) UploadMultipart(fh *multipart.FileHeader, fileKey string) error
return err
}
if _, err := w.ReadFrom(f); err != nil {
_, err = w.ReadFrom(f)
if err != nil {
w.Close()
return err
}