Fix public file share handler: include audio MIME types for inline viewing

This commit is contained in:
Leon Bösche
2026-01-25 02:29:53 +01:00
parent 91a9759874
commit aec4fd0272
2 changed files with 80 additions and 42 deletions

View File

@@ -2952,8 +2952,8 @@ func publicFileShareHandler(w http.ResponseWriter, r *http.Request, db *database
Token: viewerToken,
}
// Set view URL for PDFs and videos (for inline viewing)
if isPdf || strings.HasPrefix(mimeType, "video/") {
// Set view URL for PDFs, videos, and audio (for inline viewing)
if isPdf || strings.HasPrefix(mimeType, "video/") || strings.HasPrefix(mimeType, "audio/") {
viewerSession.ViewUrl = viewPath
}