3
请教一下腾讯云流下载慢的问题?这个是为啥
source link: https://www.v2ex.com/t/802334
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
代码如下:文件存储在腾讯云上。
@GetMapping("/test")
public void test(@RequestParam(value = "path") String path, HttpServletResponse response) {
try(InputStream inputStream = fileService.download(path)) {
IOUtils.copy(inputStream, response.getOutputStream());
} catch (IOException e) {
log.error("异常", e);
}
}
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK