mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Storage: add WithContents option to storage.Get() (#53105)
* Storage: add `WithContents` option to `storage.Get()` * fix tests Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
@@ -334,7 +334,7 @@ func (s *standardStorageService) Upload(ctx context.Context, user *user.SignedIn
|
||||
grafanaStorageLogger.Info("uploading a file", "path", req.Path)
|
||||
|
||||
if !req.OverwriteExistingFile {
|
||||
file, err := root.Store().Get(ctx, storagePath)
|
||||
file, _, err := root.Store().Get(ctx, storagePath, &filestorage.GetFileOptions{WithContents: false})
|
||||
if err != nil {
|
||||
grafanaStorageLogger.Error("failed while checking file existence", "err", err, "path", req.Path)
|
||||
return ErrUploadInternalError
|
||||
|
||||
Reference in New Issue
Block a user