mirror of
https://gitee.com/kekingcn/file-online-preview.git
synced 2026-03-14 13:13:47 +08:00
修复上传到demo中的压缩文件及pdf预览异常
This commit is contained in:
@@ -88,7 +88,8 @@ public class OnlinePreviewController {
|
||||
public void getCorsFile(String urlPath, HttpServletResponse response) {
|
||||
logger.info("下载跨域pdf文件url:{}", urlPath);
|
||||
try {
|
||||
downloadUtils.saveToOutputStreamFromUrl(urlPath, response.getOutputStream());
|
||||
byte[] bytes = downloadUtils.getBytesFromUrl(urlPath);
|
||||
downloadUtils.saveBytesToOutStream(bytes, response.getOutputStream());
|
||||
} catch (IOException e) {
|
||||
logger.error("下载跨域pdf文件异常,url:{}", urlPath, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user