From 68736efd2039317b2ca80ccacfb683580da63379 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 26 Jun 2022 10:58:45 +0200 Subject: [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 --- internal/media/util.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/media/util.go') 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. // -- cgit v1.2.3