mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
rework data function to provide filesize
This commit is contained in:
@ -29,8 +29,9 @@ import (
|
||||
)
|
||||
|
||||
func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, error) {
|
||||
data := func(innerCtx context.Context) (io.Reader, error) {
|
||||
return form.File.Open()
|
||||
data := func(innerCtx context.Context) (io.Reader, int, error) {
|
||||
f, err := form.File.Open()
|
||||
return f, int(form.File.Size), err
|
||||
}
|
||||
|
||||
focusX, focusY, err := parseFocus(form.Focus)
|
||||
|
Reference in New Issue
Block a user