|
|
@ -108,7 +108,7 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
|
|
|
FileUtils.setAttachmentResponseHeader(response, sysOss.getOriginalName());
|
|
|
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE + "; charset=UTF-8");
|
|
|
|
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())) {
|
|
|
|
try(InputStream inputStream = storage.getObjectContent(sysOss.getUrl())) {
|
|
|
|
int available = inputStream.available();
|
|
|
|
int available = inputStream.available();
|
|
|
|
IoUtil.copy(inputStream, response.getOutputStream(), available);
|
|
|
|
IoUtil.copy(inputStream, response.getOutputStream(), available);
|
|
|
|