|
|
|
|
@ -103,6 +103,9 @@ public class FileModule extends BaseHandler implements FileService {
@@ -103,6 +103,9 @@ public class FileModule extends BaseHandler implements FileService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean getFile(HttpExchange ex, File file) throws IOException { |
|
|
|
|
var headers = ex.getResponseHeaders(); |
|
|
|
|
//headers.add(CONTENT_TYPE, MIME_PDF);
|
|
|
|
|
headers.add(CONTENT_DISPOSITION,"attachment; filename=\""+file.getName()+"\""); |
|
|
|
|
return sendContent(ex,new FileInputStream(file)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|