summaryrefslogtreecommitdiff
path: root/internal/media/util.go
diff options
context:
space:
mode:
authorLibravatar kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com>2024-11-04 13:58:15 +0000
committerLibravatar GitHub <noreply@github.com>2024-11-04 14:58:15 +0100
commit8f288f1689376a8cf6ab7f431e862eb870765342 (patch)
tree42442833af06948eb3ec9f7710ed35b809cd6992 /internal/media/util.go
parent[chore]: Bump github.com/minio/minio-go/v7 from 7.0.79 to 7.0.80 (#3511) (diff)
downloadgotosocial-8f288f1689376a8cf6ab7f431e862eb870765342.tar.xz
[bugfix] determine mime-type to use during ffprobe evaluation stage, don't bother checking against file extension (#3506)
* determine mime-type to use during ffprobe evaluation stage, don't bother rechecking by file extension * set mjpeg content-type * fix up tests expecting differing default values
Diffstat (limited to 'internal/media/util.go')
-rw-r--r--internal/media/util.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/internal/media/util.go b/internal/media/util.go
index f6bf06260..4e47955ad 100644
--- a/internal/media/util.go
+++ b/internal/media/util.go
@@ -18,7 +18,6 @@
package media
import (
- "cmp"
"errors"
"fmt"
"io"
@@ -28,7 +27,6 @@ import (
"codeberg.org/gruf/go-bytesize"
"codeberg.org/gruf/go-iotools"
- "codeberg.org/gruf/go-mimetypes"
"github.com/superseriousbusiness/gotosocial/internal/gtserror"
)
@@ -87,12 +85,6 @@ func getExtension(path string) string {
return ""
}
-// getMimeType returns a suitable mimetype for file extension.
-func getMimeType(ext string) string {
- const defaultType = "application/octet-stream"
- return cmp.Or(mimetypes.MimeTypes[ext], defaultType)
-}
-
// drainToTmp drains data from given reader into a new temp file
// and closes it, returning the path of the resulting temp file.
//