update file path in zip
@@ -200,8 +200,10 @@ pub async fn get_file_contents(
let mut outfile = fs::File::create(&output).unwrap();
copy(&mut file, &mut outfile).unwrap();
- if !output.is_dir()
- && output.to_str().unwrap().ends_with("responses.pdf")
+ let file_name = output.to_str().unwrap();
+ if (!output.is_dir())
+ && (file_name.ends_with("responses.pdf")
+ || file_name.ends_with("Questionnaire.pdf"))
{
// Concatenate all the zip files into our result.
result += &format!("====================== zip file: {} ======================\n\n",output.as_path().to_str().unwrap().replace(env::temp_dir().as_path().to_str().unwrap(), ""));
