diff --git a/vas/rest/class/vmlib/phpUtil.inc b/vas/rest/class/vmlib/phpUtil.inc
index da5dbcaaa8cfade7fda55a171b8cf65dcac55de3..8bca814b10e63bf36cf34fdcd50959e5f7fe68d7 100755
--- a/vas/rest/class/vmlib/phpUtil.inc
+++ b/vas/rest/class/vmlib/phpUtil.inc
@@ -451,19 +451,24 @@ function stripslashes_deep($aString) {
      ));
 
      try{
-
+         $sServerPath = $sPrefix . str_replace($properties['ws_data_dir'], "/ws_data", $sFilePath);
+         // Suppression du slash de début de ligne.
+         if (strpos($sServerPath, '/') === 0)
+            $sServerPath = substr($sServerPath, 1);
        $aResult = $s3->deleteObject(array(
          'Bucket' => $sBucket,
-         'Key' => $sPrefix . str_replace($properties['ws_data_dir'], "/ws_data", $sFilePath)
+         'Key' => $sServerPath
        ));
 
      }catch(Aws\S3\Exception\S3Exception $e){
          writeToErrorLog($e->getMessage());
+         return false;
      }
    }else{
-     unlink($sFilePath);
+     return unlink($sFilePath);
    }
  }
+ 
  /**
   *This method upload a file in ws_data.
   *@file vmlib/phpUtil.inc