diff options
author | Saturnino Abril <saturnino.abril@gmail.com> | 2017-08-31 01:54:16 +0800 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-08-30 13:54:16 -0400 |
commit | 651dd33b29b7b8b296cc5a12479684fa836867b1 (patch) | |
tree | 60d4f385f50ab7f6b8aa75bdb6de2d98508c8784 /api/file.go | |
parent | 4c1f4674425ffeb430aa07f3fccbb09837f36a34 (diff) | |
download | chat-651dd33b29b7b8b296cc5a12479684fa836867b1.tar.gz chat-651dd33b29b7b8b296cc5a12479684fa836867b1.tar.bz2 chat-651dd33b29b7b8b296cc5a12479684fa836867b1.zip |
set to default value with config is missing (#7320)
Diffstat (limited to 'api/file.go')
-rw-r--r-- | api/file.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/api/file.go b/api/file.go index 1eab30e76..43814d8f4 100644 --- a/api/file.go +++ b/api/file.go @@ -200,7 +200,7 @@ func getPublicFile(c *Context, w http.ResponseWriter, r *http.Request) { } func getFileInfoForRequest(c *Context, r *http.Request, requireFileVisible bool) (*model.FileInfo, *model.AppError) { - if len(utils.Cfg.FileSettings.DriverName) == 0 { + if len(*utils.Cfg.FileSettings.DriverName) == 0 { return nil, model.NewAppError("getFileInfoForRequest", "api.file.get_info_for_request.storage.app_error", nil, "", http.StatusNotImplemented) } @@ -236,7 +236,7 @@ func getFileInfoForRequest(c *Context, r *http.Request, requireFileVisible bool) } func getPublicFileOld(c *Context, w http.ResponseWriter, r *http.Request) { - if len(utils.Cfg.FileSettings.DriverName) == 0 { + if len(*utils.Cfg.FileSettings.DriverName) == 0 { c.Err = model.NewLocAppError("getPublicFile", "api.file.get_public_file_old.storage.app_error", nil, "") c.Err.StatusCode = http.StatusNotImplemented return |