mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-12-22 19:33:33 +02:00
Use attachment file name as description
Pleroma 2 no longer does it automatically.
This commit is contained in:
parent
ac342dde07
commit
3ac95ab3b1
1 changed files with 6 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue