Commit 92121ea6 by bergquist

feat(alerting): add nop uploader

ref #6183
parent d726f49a
......@@ -421,7 +421,7 @@ url = https://grafana.net
#################################### External Image Storage ##############
[external_image_storage]
# You can choose between (s3, webdav)
provider = s3
provider =
[external_image_storage.s3]
bucket_url =
......
......@@ -375,8 +375,8 @@
#################################### External image storage ##########################
[external_image_storage]
# Used for uploading images to public servers so they can be included in slack/email messages.
# you can choose between (s3, webdav or internal)
;provider = s3
# you can choose between (s3, webdav)
;provider =
[external_image_storage.s3]
;bucket_url =
......
......@@ -10,6 +10,13 @@ type ImageUploader interface {
Upload(path string) (string, error)
}
type NopImageUploader struct {
}
func (NopImageUploader) Upload(path string) (string, error) {
return "", nil
}
func NewImageUploader() (ImageUploader, error) {
switch setting.ImageUploadProvider {
......@@ -53,5 +60,5 @@ func NewImageUploader() (ImageUploader, error) {
return NewWebdavImageUploader(url, username, password)
}
return nil, fmt.Errorf("could not find specified provider")
return NopImageUploader{}, nil
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment