1.使用MultipartFile file接收,不能加requestBody注解2.file.getOriginalFilename()获取文件名称,file.getInputStream()获取文件流3.上传osspublic static String putObject(String fil...
1.后端在Controller中获取到HttpServletResponse response2.获取到文件inputStream,比如从oss下载到3.流写入response// 设置响应格式response.reset();response.setContentType("applic...
获取到inputStream// 根据url获取文件URL url = new URL(URLDecoder.decode(ossUrl, "UTF-8"));HttpURLConnection conn = (HttpURLConnection) url.openConnect...