Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
疯狂的狮子li 2021-09-28 09:32:56 +08:00
commit 22b4f87232
3 changed files with 4 additions and 4 deletions

View File

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

View File

@ -46,7 +46,7 @@ public class ExcelUtil {
response.reset();
response.addHeader("Access-Control-Allow-Origin", "*");
response.addHeader("Access-Control-Expose-Headers", "Content-Disposition");
FileUtils.setAttachmentResponseHeader(response, URLEncoder.encode(filename, StandardCharsets.UTF_8.toString()));
FileUtils.setAttachmentResponseHeader(response, filename);
response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8");
ServletOutputStream os = response.getOutputStream();
EasyExcel.write(os, clazz)

View File

@ -40,7 +40,7 @@ export default {
this.saveAs(blob, decodeURI(res.headers['download-filename']))
})
},
oss(ossId, name) {
oss(ossId) {
var url = baseURL + '/system/oss/download/' + ossId
axios({
method: 'get',
@ -49,7 +49,7 @@ export default {
headers: { 'Authorization': 'Bearer ' + getToken() }
}).then(res => {
const blob = new Blob([res.data], { type: 'application/octet-stream' })
this.saveAs(blob, name)
this.saveAs(blob, decodeURI(res.headers['download-filename']))
})
},
zip(url, name) {