fix 修复 jdk8 与 jdk11 差异问题

feature/model
疯狂的狮子li 3 years ago
parent 973471c63b
commit 13da3c71d8

@ -93,7 +93,7 @@ public class SysOssController extends BaseController {
response.reset(); response.reset();
response.addHeader("Access-Control-Allow-Origin", "*"); response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition"); response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
FileUtils.setAttachmentResponseHeader(response, URLEncoder.encode(sysOss.getOriginalName(), StandardCharsets.UTF_8)); FileUtils.setAttachmentResponseHeader(response, URLEncoder.encode(sysOss.getOriginalName(), StandardCharsets.UTF_8.toString()));
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8"); response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
long data = HttpUtil.download(sysOss.getUrl(), response.getOutputStream(), false); long data = HttpUtil.download(sysOss.getUrl(), response.getOutputStream(), false);
response.setContentLength(Convert.toInt(data)); response.setContentLength(Convert.toInt(data));

Loading…
Cancel
Save