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.
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
7fa1c6c4ba
Коммит
2b27e12445
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user