[MM-26812] Add support for resumable file uploads (#15252)
* Implement AppendFile for FileBackend * Split test into subtests * [MM-26812] Add support for resumable file uploads (#15252) * Implement UploadSession * Implement UploadSessionStore * Add error strings * Implement resumable file uploads * Add UploadType * Fix retry layer tests * Regenerate store layers * Fix store error handling * Use base for filename * Prevent concurrent uploads on the same upload session * Fix erroneus error string * Improve error handling Co-authored-by: Mattermod <mattermod@users.noreply.github.com> * Fix translations Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
6a58834f34
Коммит
9c272f0b20
@@ -41,6 +41,7 @@ type Store interface {
|
||||
Emoji() EmojiStore
|
||||
Status() StatusStore
|
||||
FileInfo() FileInfoStore
|
||||
UploadSession() UploadSessionStore
|
||||
Reaction() ReactionStore
|
||||
Role() RoleStore
|
||||
Scheme() SchemeStore
|
||||
@@ -549,6 +550,14 @@ type FileInfoStore interface {
|
||||
ClearCaches()
|
||||
}
|
||||
|
||||
type UploadSessionStore interface {
|
||||
Save(session *model.UploadSession) (*model.UploadSession, error)
|
||||
Update(session *model.UploadSession) error
|
||||
Get(id string) (*model.UploadSession, error)
|
||||
GetForUser(userId string) ([]*model.UploadSession, error)
|
||||
Delete(id string) error
|
||||
}
|
||||
|
||||
type ReactionStore interface {
|
||||
Save(reaction *model.Reaction) (*model.Reaction, error)
|
||||
Delete(reaction *model.Reaction) (*model.Reaction, error)
|
||||
|
||||
Ссылка в новой задаче
Block a user