From 1dfa7fe0d51b75792db7b0c28ffad7d1f650834d Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Thu, 3 Nov 2022 15:03:12 +0100 Subject: [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 --- internal/api/model/content.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'internal/api/model/content.go') 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 } -- cgit v1.2.3