diff --git a/vas/rest/ws/vitis/File_downloader.class.inc b/vas/rest/ws/vitis/File_downloader.class.inc
index bb8749da4a18c2e8fb2361355079dfbfdd8d98de..fcc86a89c7145276ab0bf659a3a63bda15404e95 100755
--- a/vas/rest/ws/vitis/File_downloader.class.inc
+++ b/vas/rest/ws/vitis/File_downloader.class.inc
@@ -108,8 +108,11 @@ class File_downloader extends Vitis {
                   $sFileName = $this->oFilesManager->getFileName($sPath);
                   $sContentType = $this->oFilesManager->oFileInterface->mime_content_type($sPath);
                   header("Content-Type: " . $sContentType);
-                  header("Content-disposition: attachment; filename=\"" . $sFileName . "\"");
-                  header('Content-Length: ' . filesize($sPath));
+                  if (in_array($sContentType, array("text/plain", 'application/pdf'))){
+                      header("Content-disposition: inline; filename=\"" . $sFileName . "\"");
+                  } else {
+                      header("Content-disposition: attachment; filename=\"" . $sFileName . "\"");
+                  }
                   header('Content-Length: ' . $this->oFilesManager->oFileInterface->filesize($sPath));
                   if ($sContentType === "application/octet-stream") {
                     header("Content-Transfer-Encoding: Binary");