From 8400241ab4f92ca1846fe6d89556dd4f91d307d7 Mon Sep 17 00:00:00 2001 From: silverpill Date: Sun, 12 Mar 2023 20:14:58 +0000 Subject: [PATCH] Add audio/ogg and audio/x-wav to the list of supported media types --- CHANGELOG.md | 1 + src/media.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dffc84..4b42d2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Added - Enabled audio and video uploads. +- Added `audio/ogg` and `audio/x-wav` to the list of supported media types. ### Changed diff --git a/src/media.rs b/src/media.rs index 5da800b..0092395 100644 --- a/src/media.rs +++ b/src/media.rs @@ -6,14 +6,17 @@ use sha2::{Digest, Sha256}; use mitra_utils::files::{get_media_type_extension, write_file}; -pub const SUPPORTED_MEDIA_TYPES: [&str; 8] = [ +pub const SUPPORTED_MEDIA_TYPES: [&str; 11] = [ "audio/mpeg", + "audio/ogg", + "audio/x-wav", "image/apng", "image/gif", "image/jpeg", "image/png", "image/webp", "video/mp4", + "video/ogg", "video/webm", ];