change zip archive creation directory (#2650)

This commit is contained in:
aynsix
2018-06-20 13:24:07 +04:00
committed by jygaulier
parent 0decda7227
commit e74fb4b877

View File

@@ -179,7 +179,15 @@ class ApiOrderController extends BaseOrderController
set_time_limit(0);
ignore_user_abort(true);
$file = \set_export::build_zip($this->app, $token, $exportData, $token->getValue() . '.zip');
$tmpDownloadDir = \p4string::addEndSlash($this->app['tmp.download.path']);
if(is_null($tmpDownloadDir)){
$tmpDownloadDir = '';
}
$zipFile = $tmpDownloadDir.'order_'.$token->getValue() . '.zip';
$file = \set_export::build_zip($this->app, $token, $exportData, $zipFile);
return $this->deliverFile($file, $exportName, DeliverDataInterface::DISPOSITION_INLINE, 'application/zip');
}