MCPcopy
hub / github.com/mattermost/mattermost / UploadSession

Struct UploadSession

server/public/model/upload_session.go:24–48  ·  view source on GitHub ↗

UploadSession contains information used to keep track of a file upload.

Source from the content-addressed store, hash-verified

22
23// UploadSession contains information used to keep track of a file upload.
24type UploadSession struct {
25 // The unique identifier for the session.
26 Id string `json:"id"`
27 // The type of the upload.
28 Type UploadType `json:"type"`
29 // The timestamp of creation.
30 CreateAt int64 `json:"create_at"`
31 // The id of the user performing the upload.
32 UserId string `json:"user_id"`
33 // The id of the channel to upload to.
34 ChannelId string `json:"channel_id,omitempty"`
35 // The name of the file to upload.
36 Filename string `json:"filename"`
37 // The path where the file is stored.
38 Path string `json:"-"`
39 // The size of the file to upload.
40 FileSize int64 `json:"file_size"`
41 // The amount of received data in bytes. If equal to FileSize it means the
42 // upload has finished.
43 FileOffset int64 `json:"file_offset"`
44 // Id of remote cluster if uploading for shared channel
45 RemoteId string `json:"remote_id"`
46 // Requested file id if uploading for shared channel
47 ReqFileId string `json:"req_file_id"`
48}
49
50func (us *UploadSession) Auditable() map[string]any {
51 return map[string]any{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected