Add the content field to FileInfo (#15749)

* Add the content field to FileInfo

* Fixing the upgrade code

* Trying to fix the text-scheme

* Fixing test-schema

* Fixing test-schema

* Moving the migration to the next version
Этот коммит содержится в:
Jesús Espino
2020-11-02 15:43:48 +01:00
коммит произвёл GitHub
родитель 9bff309dd0
Коммит 24621a22ed
8 изменённых файлов: 111 добавлений и 2 удалений

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

@@ -6,8 +6,6 @@ package model
import (
"bytes"
"encoding/json"
"github.com/disintegration/imaging"
"github.com/mattermost/mattermost-server/v5/mlog"
"image"
"image/gif"
"image/jpeg"
@@ -16,6 +14,9 @@ import (
"net/http"
"path/filepath"
"strings"
"github.com/disintegration/imaging"
"github.com/mattermost/mattermost-server/v5/mlog"
)
const (
@@ -57,6 +58,7 @@ type FileInfo struct {
Height int `json:"height,omitempty"`
HasPreviewImage bool `json:"has_preview_image,omitempty"`
MiniPreview *[]byte `json:"mini_preview"` // declared as *[]byte to avoid postgres/mysql differences in deserialization
Content string `json:"-"`
}
func (fi *FileInfo) ToJson() string {