Commit b8405147 by bergquist

imguploader: log if the configuration is invalid

parent 212bb2a3
......@@ -3,6 +3,7 @@ package imguploader
import (
"context"
"fmt"
"github.com/grafana/grafana/pkg/log"
"regexp"
"github.com/grafana/grafana/pkg/setting"
......@@ -89,6 +90,10 @@ func NewImageUploader() (ImageUploader, error) {
return NewAzureBlobUploader(account_name, account_key, container_name), nil
}
if setting.ImageUploadProvider != "" {
log.Error2("The external image storage configuration is invalid", "unsupported provider", setting.ImageUploadProvider)
}
return NopImageUploader{}, nil
}
......
......@@ -610,7 +610,7 @@ func NewConfigContext(args *CommandLineArgs) error {
}
imageUploadingSection := Cfg.Section("external_image_storage")
ImageUploadProvider = imageUploadingSection.Key("provider").MustString("internal")
ImageUploadProvider = imageUploadingSection.Key("provider").MustString("")
return 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