1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

Add support for audio files streaming (#2645)

This commit is contained in:
Clément Nerma
2022-03-03 01:29:59 +01:00
committed by GitHub
parent 56e5c19b85
commit 955c3ac0c4
2 changed files with 4 additions and 1 deletions

View File

@ -128,7 +128,7 @@ impl NamedFile {
let ct = from_path(&path).first_or_octet_stream();
let disposition = match ct.type_() {
mime::IMAGE | mime::TEXT | mime::VIDEO => DispositionType::Inline,
mime::IMAGE | mime::TEXT | mime::AUDIO | mime::VIDEO => DispositionType::Inline,
mime::APPLICATION => match ct.subtype() {
mime::JAVASCRIPT | mime::JSON => DispositionType::Inline,
name if name == "wasm" => DispositionType::Inline,