diff --git a/runtime/src/file_data.rs b/runtime/src/file_data.rs index ab1fe0c8..f1412d6e 100644 --- a/runtime/src/file_data.rs +++ b/runtime/src/file_data.rs @@ -79,7 +79,7 @@ async fn stream_data(file_path: &str) -> Result { FileFormat::from_file(&file_path_clone) }).await??; - let ext = file_path.split('.').last().unwrap_or(""); + let ext = file_path.split('.').next_back().unwrap_or(""); let stream = match ext { DOCX | ODT => { let from = if ext == DOCX { "docx" } else { "odt" };