diff options
author | 2022-06-26 10:58:45 +0200 | |
---|---|---|
committer | 2022-06-26 10:58:45 +0200 | |
commit | 68736efd2039317b2ca80ccacfb683580da63379 (patch) | |
tree | 5a3e1a69dbfd74cdb6f103d2bc55fc45700690eb /internal/media/util.go | |
parent | [bugfix] disallow following or blocking yoursel (#667) (diff) | |
download | gotosocial-68736efd2039317b2ca80ccacfb683580da63379.tar.xz |
[feature] add configuration to `/api/v1/instance` response (#670)
* add configuration object to api instance model
* regenerate swagger docs
* add func to return all supported mimes for media
* add instance configuration to api serialization
* fix json tags
* update instance endpoint tests
* fix typeutils tests
* final regen of swagger docs
* omitempty instance configuration
Diffstat (limited to 'internal/media/util.go')
-rw-r--r-- | internal/media/util.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/internal/media/util.go b/internal/media/util.go index f3cd1b986..6dfcede89 100644 --- a/internal/media/util.go +++ b/internal/media/util.go @@ -26,6 +26,16 @@ import ( "github.com/sirupsen/logrus" ) +// AllSupportedMIMETypes just returns all media +// MIME types supported by this instance. +func AllSupportedMIMETypes() []string { + return []string{ + mimeImageJpeg, + mimeImageGif, + mimeImagePng, + } +} + // parseContentType parses the MIME content type from a file, returning it as a string in the form (eg., "image/jpeg"). // Returns an error if the content type is not something we can process. // |