|
|
|
@ -28,7 +28,13 @@ public class DownloadController {
|
|
|
|
|
if (name.endsWith("pdf") || name.endsWith("doc")) {
|
|
|
|
|
OutputStream os = null;
|
|
|
|
|
try {
|
|
|
|
|
FileInputStream input = new FileInputStream(new File(filePath + FileConstant.COMMON_FILE_PATH + name));
|
|
|
|
|
FileInputStream input = null;
|
|
|
|
|
if ("device".equals(type)){
|
|
|
|
|
input = new FileInputStream(new File(filePath + FileConstant.DEV_COMMON_FILE_PATH + name));
|
|
|
|
|
}else {
|
|
|
|
|
input = new FileInputStream(new File(filePath + FileConstant.COMMON_FILE_PATH + name));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
OutputStream out = response.getOutputStream();
|
|
|
|
|
byte[] b = new byte[2048];
|
|
|
|
|
int len;
|
|
|
|
|