summaryrefslogtreecommitdiffstats
path: root/app/team.go
diff options
context:
space:
mode:
authorJesse Hallam <jesse.hallam@gmail.com>2018-05-10 18:16:33 -0400
committerChristopher Speller <crspeller@gmail.com>2018-05-10 15:16:33 -0700
commit2b27e12445ba51e1fa1ab2aceac5fcb3de66845d (patch)
tree3d3bf61a39534e8db4cffde9b9644c3ce895580c /app/team.go
parent7fa1c6c4bae19d1647d759198126ee4591282079 (diff)
downloadchat-2b27e12445ba51e1fa1ab2aceac5fcb3de66845d.tar.gz
chat-2b27e12445ba51e1fa1ab2aceac5fcb3de66845d.tar.bz2
chat-2b27e12445ba51e1fa1ab2aceac5fcb3de66845d.zip
MM-10188: expect io.Reader in FileBackend.WriteFile (#8765)
This is a reworked set of changes originally from @josephGuo to begin reducing the duplicated memory required when uploading files.
Diffstat (limited to 'app/team.go')
-rw-r--r--app/team.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/team.go b/app/team.go
index f5235792f..aca99dd1e 100644
--- a/app/team.go
+++ b/app/team.go
@@ -1001,7 +1001,7 @@ func (a *App) SetTeamIconFromFile(teamId string, file multipart.File) *model.App
path := "teams/" + teamId + "/teamIcon.png"
- if err := a.WriteFile(buf.Bytes(), path); err != nil {
+ if _, err := a.WriteFile(buf, path); err != nil {
return model.NewAppError("SetTeamIcon", "api.team.set_team_icon.write_file.app_error", nil, "", http.StatusInternalServerError)
}