summaryrefslogtreecommitdiff
path: root/internal/processing/account/update.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/account/update.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/account/update.go')
-rw-r--r--internal/processing/account/update.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/processing/account/update.go b/internal/processing/account/update.go
index f39361c06..2ef3bfe25 100644
--- a/internal/processing/account/update.go
+++ b/internal/processing/account/update.go
@@ -192,7 +192,7 @@ func (p *processor) UpdateAvatar(ctx context.Context, avatar *multipart.FileHead
return nil, fmt.Errorf("UpdateAvatar: avatar with size %d exceeded max image size of %d bytes", avatar.Size, maxImageSize)
}
- dataFunc := func(innerCtx context.Context) (io.Reader, int64, error) {
+ dataFunc := func(innerCtx context.Context) (io.ReadCloser, int64, error) {
f, err := avatar.Open()
return f, avatar.Size, err
}
@@ -219,7 +219,7 @@ func (p *processor) UpdateHeader(ctx context.Context, header *multipart.FileHead
return nil, fmt.Errorf("UpdateHeader: header with size %d exceeded max image size of %d bytes", header.Size, maxImageSize)
}
- dataFunc := func(innerCtx context.Context) (io.Reader, int64, error) {
+ dataFunc := func(innerCtx context.Context) (io.ReadCloser, int64, error) {
f, err := header.Open()
return f, header.Size, err
}