mirror of
https://git.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 03:51:28 +00:00
Use attachment file name as description
Pleroma 2 no longer does it automatically.
This commit is contained in:
parent
ac342dde07
commit
3ac95ab3b1
|
@ -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