Be sure FAX path exists before uploading (#2345)

This commit is contained in:
Luis Daniel Lucio Quiroz 2017-02-07 23:37:48 -05:00 committed by FusionPBX
parent 3f9ce5bf86
commit 83c82f1bbf
1 changed files with 4 additions and 0 deletions

View File

@ -353,6 +353,10 @@ function fax_split_dtmf(&$fax_number, &$fax_dtmf){
unset($attachment_file_name);
if (!$included) {
//check if directory exists
if (!is_dir($dir_fax_temp)) {
event_socket_mkdir($dir_fax_temp);
}
//move uploaded file
move_uploaded_file($_files['tmp_name'][$index], $dir_fax_temp.'/'.$fax_name.'.'.$fax_file_extension);
}