diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt index e622c798e..3153797b5 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/service/uploads/VideoCompressionHelper.kt @@ -270,9 +270,16 @@ class VideoCompressionHelper { "Compressed [$size] ($reductionPercent% reduction)", ) + // Attempt to correct the path: if it contains "_temp" then remove it + val correctedPath = + if (path.contains("_temp")) { + path.replace("_temp", "") + } else { + path + } if (continuation.isActive) { continuation.resume( - MediaCompressorResult(Uri.fromFile(File(path)), contentType, size), + MediaCompressorResult(Uri.fromFile(File(correctedPath)), contentType, size), ) } }