Implement brand image endpoints for APIv4 (#5733)

* Implement brand image endpoints for APIv4

* Fix unit test
Этот коммит содержится в:
Joram Wilander
2017-03-14 09:35:48 -04:00
коммит произвёл GitHub
родитель d03367c560
Коммит ad0ed008fe
7 изменённых файлов: 204 добавлений и 15 удалений

Просмотреть файл

@@ -230,12 +230,6 @@ func getAnalytics(c *Context, w http.ResponseWriter, r *http.Request) {
}
func uploadBrandImage(c *Context, w http.ResponseWriter, r *http.Request) {
if len(utils.Cfg.FileSettings.DriverName) == 0 {
c.Err = model.NewLocAppError("uploadBrandImage", "api.admin.upload_brand_image.storage.app_error", nil, "")
c.Err.StatusCode = http.StatusNotImplemented
return
}
if r.ContentLength > *utils.Cfg.FileSettings.MaxFileSize {
c.Err = model.NewLocAppError("uploadBrandImage", "api.admin.upload_brand_image.too_large.app_error", nil, "")
c.Err.StatusCode = http.StatusRequestEntityTooLarge