[MM-57500] Streaming support for importing file attachments (#26629)
* Bulk import: stream file attachments uploads * Add comment with context on buffer size * Add file name to logs * Use sha256 to do checksum * Fix bad merge * Fix import file * Update test --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
ffc08858cf
Коммит
446c763fa8
@@ -267,12 +267,16 @@ func TestImportProcessImportDataFileVersionLine(t *testing.T) {
|
||||
}
|
||||
|
||||
func GetAttachments(userID string, th *TestHelper, t *testing.T) []*model.FileInfo {
|
||||
t.Helper()
|
||||
|
||||
fileInfos, err := th.App.Srv().Store().FileInfo().GetForUser(userID)
|
||||
require.NoError(t, err)
|
||||
return fileInfos
|
||||
}
|
||||
|
||||
func AssertFileIdsInPost(files []*model.FileInfo, th *TestHelper, t *testing.T) {
|
||||
t.Helper()
|
||||
|
||||
postID := files[0].PostId
|
||||
require.NotNil(t, postID)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user