diff options
author | r <r@freesoftwareextremist.com> | 2021-01-30 04:13:22 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2021-01-30 04:13:22 +0000 |
commit | 9f34b607498c09b4a21bdcc82b3295f6c94bd058 (patch) | |
tree | c5a528cad05227f15f30b07f6d0056045176166b /mastodon/mastodon.go | |
parent | c3f39210d8451d65f3ecaa88046380f42dc536a1 (diff) | |
parent | 3ac95ab3b117ee8867a30c8e4b30ab37411e5ccf (diff) | |
download | bloat-9f34b607498c09b4a21bdcc82b3295f6c94bd058.tar.gz bloat-9f34b607498c09b4a21bdcc82b3295f6c94bd058.zip |
Merge branch 'master' into absolute_fluoride
Diffstat (limited to 'mastodon/mastodon.go')
-rw-r--r-- | mastodon/mastodon.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mastodon/mastodon.go b/mastodon/mastodon.go index 658b09b..8678314 100644 --- a/mastodon/mastodon.go +++ b/mastodon/mastodon.go @@ -91,7 +91,12 @@ func (c *Client) doAPI(ctx context.Context, method string, uri string, params in var buf bytes.Buffer mw := multipart.NewWriter(&buf) - part, err := mw.CreateFormFile("file", filepath.Base(file.Filename)) + fname := filepath.Base(file.Filename) + err = mw.WriteField("description", fname) + if err != nil { + return err + } + part, err := mw.CreateFormFile("file", fname) if err != nil { return err } |