summaryrefslogtreecommitdiff
path: root/internal/processing/media/create.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-11-03 15:03:12 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-03 15:03:12 +0100
commit1dfa7fe0d51b75792db7b0c28ffad7d1f650834d (patch)
tree0af4de062d33e6c292d8b42dbf4d13f16125b959 /internal/processing/media/create.go
parent[bugfix] Use []rune to check length of user-submitted text (#948) (diff)
downloadgotosocial-1dfa7fe0d51b75792db7b0c28ffad7d1f650834d.tar.xz
[bugfix] Wrap media in read closer (#941)
* use readcloser for content.Content * call media postdata function no matter what * return a readcloser from data func * tidy of logic of readertostore * fix whoopsie
Diffstat (limited to 'internal/processing/media/create.go')
-rw-r--r--internal/processing/media/create.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/processing/media/create.go b/internal/processing/media/create.go
index eb0c251e9..451a77391 100644
--- a/internal/processing/media/create.go
+++ b/internal/processing/media/create.go
@@ -30,7 +30,7 @@ import (
)
func (p *processor) Create(ctx context.Context, account *gtsmodel.Account, form *apimodel.AttachmentRequest) (*apimodel.Attachment, gtserror.WithCode) {
- data := func(innerCtx context.Context) (io.Reader, int64, error) {
+ data := func(innerCtx context.Context) (io.ReadCloser, int64, error) {
f, err := form.File.Open()
return f, form.File.Size, err
}