diff --git a/main/document/downloadfolder.inc.php b/main/document/downloadfolder.inc.php index a675b1cac6..35abae1bc4 100755 --- a/main/document/downloadfolder.inc.php +++ b/main/document/downloadfolder.inc.php @@ -158,7 +158,9 @@ event_download(($path=='/')?'documents.zip (folder)':basename($path).'.zip (fold //start download of created file //send_file_to_client($temp_zip_file, basename(empty($_GET['id'])?"documents":$_GET['id']).".zip"); $name = ($path=='/')?'documents.zip':basename($path).'.zip'; + DocumentManager::file_send_for_download($temp_zip_file,true,$name); +@unlink($temp_zip_file); exit; /** diff --git a/main/work/downloadfolder.inc.php b/main/work/downloadfolder.inc.php index 95051e8113..2bc8bc091e 100755 --- a/main/work/downloadfolder.inc.php +++ b/main/work/downloadfolder.inc.php @@ -125,6 +125,7 @@ event_download(basename($path).'.zip (folder)'); //start download of created file $name = basename($path).'.zip'; DocumentManager::file_send_for_download($temp_zip_file,true,$name); +@unlink($temp_zip_file); exit; /**