This reverts commit ea61458f16. This was causing panic in the plugins because the client and the plugin API changed with this PR
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
26b86cb3ef
Коммит
c0971970e9
12
app/file.go
12
app/file.go
@@ -253,9 +253,9 @@ func (a *App) RemoveDirectory(path string) *model.AppError {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) getInfoForFilename(post *model.Post, teamID, channelID, userID, oldID, filename string) *model.FileInfo {
|
||||
func (a *App) getInfoForFilename(post *model.Post, teamID, channelID, userID, oldId, filename string) *model.FileInfo {
|
||||
name, _ := url.QueryUnescape(filename)
|
||||
pathPrefix := fmt.Sprintf("teams/%s/channels/%s/users/%s/%s/", teamID, channelID, userID, oldID)
|
||||
pathPrefix := fmt.Sprintf("teams/%s/channels/%s/users/%s/%s/", teamID, channelID, userID, oldId)
|
||||
path := pathPrefix + name
|
||||
|
||||
// Open the file and populate the fields of the FileInfo
|
||||
@@ -959,11 +959,11 @@ func (t UploadFileTask) newAppError(id string, httpStatus int, extra ...interfac
|
||||
return model.NewAppError("uploadFileTask", id, params, "", httpStatus)
|
||||
}
|
||||
|
||||
func (a *App) DoUploadFileExpectModification(now time.Time, rawTeamID string, rawChannelID string, rawUserID string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError) {
|
||||
func (a *App) DoUploadFileExpectModification(now time.Time, rawTeamId string, rawChannelId string, rawUserId string, rawFilename string, data []byte) (*model.FileInfo, []byte, *model.AppError) {
|
||||
filename := filepath.Base(rawFilename)
|
||||
teamID := filepath.Base(rawTeamID)
|
||||
channelID := filepath.Base(rawChannelID)
|
||||
userID := filepath.Base(rawUserID)
|
||||
teamID := filepath.Base(rawTeamId)
|
||||
channelID := filepath.Base(rawChannelId)
|
||||
userID := filepath.Base(rawUserId)
|
||||
|
||||
info, err := model.GetInfoForBytes(filename, bytes.NewReader(data), len(data))
|
||||
if err != nil {
|
||||
|
||||
Ссылка в новой задаче
Block a user