Defaults and start of config
This commit is contained in:
parent
3086b0e9b4
commit
1fbdf7fc9d
6 changed files with 128 additions and 10 deletions
|
@ -13,10 +13,21 @@ type MediaFile struct {
|
|||
DeletedAt gorm.DeletedAt `gorm:"index"`
|
||||
Remote bool // whether the attachment is a remote one
|
||||
Link string // url if remote attachment, identifier if local
|
||||
Type string // What media type this is, eg image/png
|
||||
// Whether this media has been cached locally
|
||||
// Only really used for user and server icons, not attachments
|
||||
// If true, Link will be read as file path. url otherwise
|
||||
// Reason: Attachments would take way to much space considering that they are often only loaded a few times at most
|
||||
// And caching a file for those few times would be a waste of storage
|
||||
// Caching user and server icons locally however should reduce burden on remote servers by quite a bit though
|
||||
LocallyCached bool
|
||||
}
|
||||
|
||||
// Placeholder media file. Acts as placeholder for media file fields that have not been initialised yet but need a value
|
||||
var placeholderMediaFile = &MediaFile{
|
||||
ID: "placeholder",
|
||||
Remote: false,
|
||||
Link: "placeholder", // TODO: Replace this with a file path to a staticly included image
|
||||
Type: "image/png",
|
||||
LocallyCached: true,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue