diff options
author | 2022-11-03 15:03:12 +0100 | |
---|---|---|
committer | 2022-11-03 15:03:12 +0100 | |
commit | 1dfa7fe0d51b75792db7b0c28ffad7d1f650834d (patch) | |
tree | 0af4de062d33e6c292d8b42dbf4d13f16125b959 /internal/processing/media/create.go | |
parent | [bugfix] Use []rune to check length of user-submitted text (#948) (diff) | |
download | gotosocial-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.go | 2 |
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 } |