summaryrefslogtreecommitdiff
path: root/internal/api/model/content.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/api/model/content.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/api/model/content.go')
-rw-r--r--internal/api/model/content.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/api/model/content.go b/internal/api/model/content.go
index aa02a99c3..ecce07356 100644
--- a/internal/api/model/content.go
+++ b/internal/api/model/content.go
@@ -30,7 +30,7 @@ type Content struct {
// ContentLength in bytes
ContentLength int64
// Actual content
- Content io.Reader
+ Content io.ReadCloser
// Resource URL to forward to if the file can be fetched from the storage directly (e.g signed S3 URL)
URL *url.URL
}