* Initial implementation of a CopyFileInfos function that creates new FileInfo objects copied from provided FileIds with the provided user as the creator and not linked to a post yet. This can subsequently be used to copy existing attachments from another post to attach to a new post without having to re-upload the actual files

* added a unit test for the CopyFileInfos function

* resolving pull request suggestions
Этот коммит содержится в:
dmitrysamuylovpharo
2018-08-02 10:37:31 -04:00
коммит произвёл Harrison Healey
родитель b728b16f90
Коммит 7a731d2bd1
6 изменённых файлов: 127 добавлений и 0 удалений

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

@@ -275,6 +275,10 @@ func (api *PluginAPI) UpdatePost(post *model.Post) (*model.Post, *model.AppError
return api.app.UpdatePost(post, false)
}
func (api *PluginAPI) CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError) {
return api.app.CopyFileInfos(userId, fileIds)
}
func (api *PluginAPI) KVSet(key string, value []byte) *model.AppError {
return api.app.SetPluginKey(api.id, key, value)
}