Commit 812ce567 authored by Lionel VEST's avatar Lionel VEST
Browse files

*

parent f0e86795
......@@ -23,8 +23,8 @@ function read($connection,$input)
$path = '/srv/files/'. $input->db . str_replace('/files/'. $input->db, '', $input->body->path);
$zip_to_create = time() . ".zip";
exec("LC_ALL=fr_FR.UTF-8 export HOME=/srv/api/tmp/ && cd '" . $path . "'; zip -r '" . $zip_to_create . "'" . implode("' '",$input->body->items) . "' 2>&1",$output);
if (is_file('/srv/files/demo@demoptimus.fr/==DOSSIERS==/test.zip'))
exec("LC_ALL=fr_FR.UTF-8 export HOME=/srv/api/tmp/ && cd '" . $path . "'; zip -r '" . $zip_to_create . "' " . implode("' '",$input->body->items) . "' 2>&1",$output);
if (is_file('/srv/files/demo@demoptimus.fr/==DOSSIERS==/' . $zip_to_create))
return array("code" => 200, "message" => "Conversion effectuée avec succès");
else
return array("code" => 400, "message" => "La conversion a échoué");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment