From d4cddf460a5145965b398e167f3cea24b5e3e436 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 16 Jan 2023 16:19:17 +0100 Subject: [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 --- internal/api/model/content.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/api/model/content.go') 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) -- cgit v1.2.3