[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
@@ -89,6 +89,7 @@ type SqlSupplierStores struct {
|
||||
emoji store.EmojiStore
|
||||
status store.StatusStore
|
||||
fileInfo store.FileInfoStore
|
||||
uploadSession store.UploadSessionStore
|
||||
reaction store.ReactionStore
|
||||
job store.JobStore
|
||||
userAccessToken store.UserAccessTokenStore
|
||||
@@ -157,6 +158,7 @@ func NewSqlSupplier(settings model.SqlSettings, metrics einterfaces.MetricsInter
|
||||
supplier.stores.emoji = newSqlEmojiStore(supplier, metrics)
|
||||
supplier.stores.status = newSqlStatusStore(supplier)
|
||||
supplier.stores.fileInfo = newSqlFileInfoStore(supplier, metrics)
|
||||
supplier.stores.uploadSession = newSqlUploadSessionStore(supplier)
|
||||
supplier.stores.job = newSqlJobStore(supplier)
|
||||
supplier.stores.userAccessToken = newSqlUserAccessTokenStore(supplier)
|
||||
supplier.stores.channelMemberHistory = newSqlChannelMemberHistoryStore(supplier)
|
||||
@@ -202,6 +204,7 @@ func NewSqlSupplier(settings model.SqlSettings, metrics einterfaces.MetricsInter
|
||||
supplier.stores.emoji.(*SqlEmojiStore).createIndexesIfNotExists()
|
||||
supplier.stores.status.(*SqlStatusStore).createIndexesIfNotExists()
|
||||
supplier.stores.fileInfo.(*SqlFileInfoStore).createIndexesIfNotExists()
|
||||
supplier.stores.uploadSession.(*SqlUploadSessionStore).createIndexesIfNotExists()
|
||||
supplier.stores.job.(*SqlJobStore).createIndexesIfNotExists()
|
||||
supplier.stores.userAccessToken.(*SqlUserAccessTokenStore).createIndexesIfNotExists()
|
||||
supplier.stores.plugin.(*SqlPluginStore).createIndexesIfNotExists()
|
||||
@@ -1134,6 +1137,10 @@ func (ss *SqlSupplier) FileInfo() store.FileInfoStore {
|
||||
return ss.stores.fileInfo
|
||||
}
|
||||
|
||||
func (ss *SqlSupplier) UploadSession() store.UploadSessionStore {
|
||||
return ss.stores.uploadSession
|
||||
}
|
||||
|
||||
func (ss *SqlSupplier) Reaction() store.ReactionStore {
|
||||
return ss.stores.reaction
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user