Embed Notice
HTML Code
Corresponding Notice
- Embed this notice@romin @judgedread Did not work for me, but I wouldn't put it past most web "frameworks" to do this in an order-dependent manner, so lemme try putting it before like r did.
diff --git a/mastodon/mastodon.go b/mastodon/mastodon.go
index 8e2fa04..bb979cd 100644
--- a/mastodon/mastodon.go
+++ b/mastodon/mastodon.go
@@ -73,6 +73,11 @@ func (c *Client) doAPI(ctx context.Context, method string, uri string, params in
if err != nil {
return err
}
+ err = mw.WriteField("description", filepath.Base(file))
+ if err != nil {
+ mw.Close()
+ return err
+ }
err = mw.Close()
if err != nil {
return err
@@ -99,6 +104,11 @@ func (c *Client) doAPI(ctx context.Context, method string, uri string, params in
if err != nil {
return err
}
+ err = mw.WriteField("description", filepath.Base(file.Filename))
+ if err != nil {
+ mw.Close()
+ return err
+ }
err = mw.Close()
if err != nil {
return err