From fadd9514f6e71590aba781a7035e1de4150137b0 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Wed, 4 Oct 2017 11:42:38 -0400 Subject: PLT-7718 Patch for files (#7564) * Patch for files * Fix merge * Fix tests * Fix another test --- app/file.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/file.go') diff --git a/app/file.go b/app/file.go index 36a23e3d8..2beb7231a 100644 --- a/app/file.go +++ b/app/file.go @@ -291,8 +291,11 @@ func (a *App) UploadFiles(teamId string, channelId string, userId string, fileHe return resStruct, nil } -func (a *App) DoUploadFile(now time.Time, teamId string, channelId string, userId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError) { +func (a *App) DoUploadFile(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, *model.AppError) { filename := filepath.Base(rawFilename) + teamId := filepath.Base(rawTeamId) + channelId := filepath.Base(rawChannelId) + userId := filepath.Base(rawUserId) info, err := model.GetInfoForBytes(filename, data) if err != nil { -- cgit v1.2.3-1-g7c22