fix 修复 OssClient 切换服务 实例不正确问题

2.X
疯狂的狮子Li 2 years ago
parent 0226c2de1f
commit 514150b92f

@ -111,7 +111,7 @@ public class SysOssServiceImpl implements ISysOssService {
}
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
OssClient storage = OssFactory.instance();
OssClient storage = OssFactory.instance(sysOss.getService());
try(InputStream inputStream = storage.getObjectContent(sysOss.getUrl())) {
int available = inputStream.available();
IoUtil.copy(inputStream, response.getOutputStream(), available);

Loading…
Cancel
Save