diff options
author | 2023-01-16 16:19:17 +0100 | |
---|---|---|
committer | 2023-01-16 16:19:17 +0100 | |
commit | d4cddf460a5145965b398e167f3cea24b5e3e436 (patch) | |
tree | 913fb17d42b2585e0420d5d3578cd5dc0b302eec /internal/api/model/content.go | |
parent | [chore]: Bump github.com/minio/minio-go/v7 from 7.0.44 to 7.0.47 (#1348) (diff) | |
download | gotosocial-d4cddf460a5145965b398e167f3cea24b5e3e436.tar.xz |
[bugfix] Parse video metadata more accurately; allow Range in fileserver (#1342)
* don't serve unused fields for video attachments
* parse video bitrate + duration more accurately
* use ServeContent where appropriate to respect Range
* abstract temp file seeker into its own function
Diffstat (limited to 'internal/api/model/content.go')
-rw-r--r-- | internal/api/model/content.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/api/model/content.go b/internal/api/model/content.go index 94b32d112..4c0151c2c 100644 --- a/internal/api/model/content.go +++ b/internal/api/model/content.go @@ -21,6 +21,7 @@ package model import ( "io" "net/url" + "time" ) // Content wraps everything needed to serve a blob of content (some kind of media) through the API. @@ -29,6 +30,8 @@ type Content struct { ContentType string // ContentLength in bytes ContentLength int64 + // Time when the content was last updated. + ContentUpdated time.Time // Actual content Content io.ReadCloser // Resource URL to forward to if the file can be fetched from the storage directly (e.g signed S3 URL) |