Skip to content
Snippets Groups Projects
Commit e0f1e142 authored by tpylak's avatar tpylak
Browse files

LMS-415 recursive download service for the CLI

SVN: 6100
parent cd98f99e
No related branches found
No related tags found
No related merge requests found
...@@ -67,6 +67,8 @@ public class DatasetDownloadServlet extends HttpServlet ...@@ -67,6 +67,8 @@ public class DatasetDownloadServlet extends HttpServlet
static final String DISPLAY_MODE_KEY = "mode"; static final String DISPLAY_MODE_KEY = "mode";
static final String BINARY_CONTENT_TYPE = "binary";
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
protected static final Logger operationLog = protected static final Logger operationLog =
...@@ -362,6 +364,7 @@ public class DatasetDownloadServlet extends HttpServlet ...@@ -362,6 +364,7 @@ public class DatasetDownloadServlet extends HttpServlet
response.setHeader("Content-Disposition", "inline; filename=" + file.getName()); response.setHeader("Content-Disposition", "inline; filename=" + file.getName());
ServletOutputStream outputStream = null; ServletOutputStream outputStream = null;
FileInputStream fileInputStream = null; FileInputStream fileInputStream = null;
response.setContentType(BINARY_CONTENT_TYPE);
try try
{ {
outputStream = response.getOutputStream(); outputStream = response.getOutputStream();
......
...@@ -43,6 +43,7 @@ public class PlainTextRendererFactory implements IRendererFactory ...@@ -43,6 +43,7 @@ public class PlainTextRendererFactory implements IRendererFactory
public void printErrorMessage(String errorMessage) public void printErrorMessage(String errorMessage)
{ {
writer.println("Error:");
writer.println(errorMessage); writer.println(errorMessage);
} }
...@@ -83,6 +84,7 @@ public class PlainTextRendererFactory implements IRendererFactory ...@@ -83,6 +84,7 @@ public class PlainTextRendererFactory implements IRendererFactory
public void printHeader(ExternalData dataSet) public void printHeader(ExternalData dataSet)
{ {
writer.println("Directory content:");
} }
public void printLinkToParentDirectory(String relativePath) public void printLinkToParentDirectory(String relativePath)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment