|
|
@ -28,6 +28,7 @@ import javax.xml.transform.dom.DOMSource;
|
|
|
|
import javax.xml.transform.stream.StreamResult;
|
|
|
|
import javax.xml.transform.stream.StreamResult;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.io.FilenameUtils;
|
|
|
|
import org.apache.commons.io.FilenameUtils;
|
|
|
|
|
|
|
|
import org.apache.poi.xslf.usermodel.XMLSlideShow;
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
import org.springframework.core.io.ClassPathResource;
|
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
import org.springframework.http.HttpHeaders;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
@ -286,10 +287,19 @@ public class FileController extends cokr.xit.base.file.web.FileController {
|
|
|
|
|
|
|
|
|
|
|
|
String filePath = ("menual/메뉴얼.pptx");
|
|
|
|
String filePath = ("menual/메뉴얼.pptx");
|
|
|
|
ClassPathResource cps = new ClassPathResource(filePath);
|
|
|
|
ClassPathResource cps = new ClassPathResource(filePath);
|
|
|
|
InputStream menualIS = cps.getInputStream();
|
|
|
|
String menualVersion = "";
|
|
|
|
|
|
|
|
try (XMLSlideShow slideShow = new XMLSlideShow(cps.getInputStream())) {
|
|
|
|
|
|
|
|
menualVersion = slideShow
|
|
|
|
|
|
|
|
.getProperties()
|
|
|
|
|
|
|
|
.getCoreProperties()
|
|
|
|
|
|
|
|
.getUnderlyingProperties()
|
|
|
|
|
|
|
|
.getVersionProperty()
|
|
|
|
|
|
|
|
.get();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
InputStream menualIS = cps.getInputStream();
|
|
|
|
mav.addObject("file", menualIS);
|
|
|
|
mav.addObject("file", menualIS);
|
|
|
|
mav.addObject("filename", "메뉴얼.pptx");
|
|
|
|
mav.addObject("filename", "과태료통합관리시스템_메뉴얼"+"("+"v"+menualVersion+")"+".pptx");
|
|
|
|
mav.addObject("contentType", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
|
|
|
mav.addObject("contentType", "application/vnd.openxmlformats-officedocument.presentationml.presentation");
|
|
|
|
mav.addObject("length", menualIS.available());
|
|
|
|
mav.addObject("length", menualIS.available());
|
|
|
|
|
|
|
|
|
|
|
|