Image Upload #1
@@ -203,7 +203,11 @@ async fn stream_video(
|
|||||||
let playlist = &path.path;
|
let playlist = &path.path;
|
||||||
println!("Playlist: {}", playlist);
|
println!("Playlist: {}", playlist);
|
||||||
|
|
||||||
if let Ok(file) = NamedFile::open(playlist) {
|
// Extract video playlist dir to dotenv
|
||||||
|
if !playlist.starts_with("tmp") || playlist.contains("..") {
|
||||||
|
HttpResponse::NotFound().finish()
|
||||||
|
}
|
||||||
|
else if let Ok(file) = NamedFile::open(playlist) {
|
||||||
file.into_response(&request).unwrap()
|
file.into_response(&request).unwrap()
|
||||||
} else {
|
} else {
|
||||||
HttpResponse::NotFound().finish()
|
HttpResponse::NotFound().finish()
|
||||||
|
|||||||
Reference in New Issue
Block a user