From cdf2b10fd240f2221e8bebf1800411438764549d Mon Sep 17 00:00:00 2001 From: David Kaspar Date: Tue, 18 Mar 2025 12:55:31 +0000 Subject: [PATCH] trim inline meta data to fix sniffing (required for DM messages) --- .../com/vitorpamplona/amethyst/ui/actions/MediaSaverToDisk.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/MediaSaverToDisk.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/MediaSaverToDisk.kt index 4f2aa90b2..d79dd754c 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/MediaSaverToDisk.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/actions/MediaSaverToDisk.kt @@ -120,7 +120,7 @@ object MediaSaverToDisk { check(response.isSuccessful) if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { - val contentType = response.header("Content-Type") ?: getMimeTypeFromExtension(url) + val contentType = response.header("Content-Type") ?: getMimeTypeFromExtension(trimInlineMetaData(url)) check(contentType.isNotBlank()) { "Can't find out the content type" } val realType =