From d936a7fea0173ef0c4fef5dc177f71a8946b7a12 Mon Sep 17 00:00:00 2001
From: Anthony Borghi <anthony.borghi@veremes.com>
Date: Fri, 19 Oct 2018 11:29:39 +0200
Subject: [PATCH] Correction sur la suppression du fichier dans ws_data

---
 vas/rest/ws/vitis/File_downloader.class.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/vas/rest/ws/vitis/File_downloader.class.inc b/vas/rest/ws/vitis/File_downloader.class.inc
index 20204691..2fab279f 100644
--- a/vas/rest/ws/vitis/File_downloader.class.inc
+++ b/vas/rest/ws/vitis/File_downloader.class.inc
@@ -141,7 +141,9 @@ class File_downloader extends Vitis {
           if($bReturnFile){
             session_write_close();
             $this->getFile($sPath, end(explode("/", $this->aValues["key"])));
-            unlink($sPath);
+            if ($this->aProperties["fileS3Uploader"]){
+              unlink($sPath);
+            }
           }
 
         } else {
-- 
GitLab