diff options
author | 2022-07-22 13:43:51 +0200 | |
---|---|---|
committer | 2022-07-22 13:43:51 +0200 | |
commit | 7ca5bac7c678dff0e9fb33b3cf5824165ca9d3f1 (patch) | |
tree | 05bb76eac788eb391736c946605ab6318a22a0ee /internal/api/model/status.go | |
parent | [docs] Add client_max_body_size 40M; to nginx docs (#727) (diff) | |
download | gotosocial-7ca5bac7c678dff0e9fb33b3cf5824165ca9d3f1.tar.xz |
[bugfix] Fix Toot CLI media attachments not working properly (#726)v0.3.8
Diffstat (limited to 'internal/api/model/status.go')
-rw-r--r-- | internal/api/model/status.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/api/model/status.go b/internal/api/model/status.go index 6e25f787a..62efaf434 100644 --- a/internal/api/model/status.go +++ b/internal/api/model/status.go @@ -144,8 +144,12 @@ type StatusCreateRequest struct { Status string `form:"status" json:"status" xml:"status"` // Array of Attachment ids to be attached as media. // If provided, status becomes optional, and poll cannot be used. + // + // If the status is being submitted as a form, the key is 'media_ids[]', + // but if it's json or xml, the key is 'media_ids'. + // // in: formData - MediaIDs []string `form:"media_ids" json:"media_ids" xml:"media_ids"` + MediaIDs []string `form:"media_ids[]" json:"media_ids" xml:"media_ids"` // Poll to include with this status. // swagger:ignore Poll *PollRequest `form:"poll" json:"poll" xml:"poll"` |