Feature/fileinfo create copy (#9198)
* 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
Этот коммит содержится в:
коммит произвёл
Harrison Healey
родитель
b728b16f90
Коммит
7a731d2bd1
@@ -155,6 +155,13 @@ type API interface {
|
||||
// UpdatePost updates a post.
|
||||
UpdatePost(post *model.Post) (*model.Post, *model.AppError)
|
||||
|
||||
// CopyFileInfos creates a copy of FileInfo objects provided in the list of FileIds
|
||||
// these new FileInfo objects will not be linked to any post and will
|
||||
// be ready to provide to a new CreatePost call
|
||||
// this should be used when you want to create a copy of a post including
|
||||
// file attachments without duplicating the file uploads
|
||||
CopyFileInfos(userId string, fileIds []string) ([]string, *model.AppError)
|
||||
|
||||
// KVSet will store a key-value pair, unique per plugin.
|
||||
KVSet(key string, value []byte) *model.AppError
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user