mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 00:32:26 -05:00
[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
This commit is contained in:
parent
fe3e9ede52
commit
d4cddf460a
14 changed files with 216 additions and 92 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue