worky worky quite contrerky

This commit is contained in:
tsmethurst 2021-05-11 20:33:16 +02:00
commit eb57c95c14
25 changed files with 544 additions and 216 deletions

View file

@ -24,8 +24,8 @@ import "mime/multipart"
// See: https://docs.joinmastodon.org/methods/statuses/media/
type AttachmentRequest struct {
File *multipart.FileHeader `form:"file" binding:"required"`
Description string `form:"description" json:"description" xml:"description"`
Focus string `form:"focus" json:"focus" xml:"focus"`
Description string `form:"description"`
Focus string `form:"focus"`
}
// AttachmentRequest represents the form data parameters submitted by a client during a media update/PUT request.
@ -63,7 +63,7 @@ type Attachment struct {
// See https://docs.joinmastodon.org/methods/statuses/media/#focal-points points for more.
Meta MediaMeta `json:"meta,omitempty"`
// Alternate text that describes what is in the media attachment, to be used for the visually impaired or when media attachments do not load.
Description string `json:"description"`
Description string `json:"description,omitempty"`
// A hash computed by the BlurHash algorithm, for generating colorful preview thumbnails when media has not been downloaded yet.
// See https://github.com/woltapp/blurhash
Blurhash string `json:"blurhash,omitempty"`