summaryrefslogtreecommitdiff
path: root/internal/media/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/media/types.go')
-rw-r--r--internal/media/types.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/media/types.go b/internal/media/types.go
index 5b3fe4a41..0a7f60d66 100644
--- a/internal/media/types.go
+++ b/internal/media/types.go
@@ -20,6 +20,7 @@ package media
import (
"context"
+ "io"
"time"
)
@@ -28,7 +29,7 @@ import (
//
// See: https://en.wikipedia.org/wiki/File_format#File_header
// and https://github.com/h2non/filetype
-const maxFileHeaderBytes = 262
+const maxFileHeaderBytes = 261
// mime consts
const (
@@ -117,4 +118,4 @@ type AdditionalEmojiInfo struct {
}
// DataFunc represents a function used to retrieve the raw bytes of a piece of media.
-type DataFunc func(ctx context.Context) ([]byte, error)
+type DataFunc func(ctx context.Context) (io.Reader, error)