1
0
mirror of https://gitlab.com/comunic/comunicapiv3 synced 2024-11-22 21:39:21 +00:00

Generate full destination path

This commit is contained in:
Pierre HUBERT 2020-06-22 08:45:49 +02:00
parent e547219824
commit 1da7a30419

View File

@ -14,8 +14,8 @@ use crate::data::config::conf;
use crate::data::error::{ExecError, ResultBoxError};
use crate::data::user::UserID;
use crate::helpers::{account_helper, api_helper, conversations_helper, user_helper};
use crate::utils::user_data_utils::{generate_new_user_data_file_name, prepare_file_creation, user_data_path};
use crate::utils::virtual_directories_utils::check_virtual_directory;
use crate::utils::user_data_utils::{prepare_file_creation, generate_new_user_data_file_name};
/// Http request handler
///
@ -281,8 +281,9 @@ impl HttpRequestHandler {
let target_user_data_folder = prepare_file_creation(self.user_id()?, folder)?;
let target_file_path = generate_new_user_data_file_name(target_user_data_folder.as_path(), "png")?;
let target_sys_path = user_data_path(target_file_path.as_path());
Ok(target_file_path.to_str().unwrap().to_string())
Ok(target_sys_path.to_str().unwrap().to_string())
}
/// Get an integer included in the POST request