Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
optimus
api
Commits
812ce567
Commit
812ce567
authored
Dec 01, 2020
by
Lionel VEST
Browse files
*
parent
f0e86795
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
resources/files.php
resources/files.php
+2
-2
No files found.
resources/files.php
View file @
812ce567
...
...
@@ -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é"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment