java获取下载链接文件流并上传至OSS

InputStream inputStream = new URL("下载链接地址").openStream();
MultipartFile file = new MockMultipartFile("file","上传文件名称”, ContentType.APPLICATION_OCTET_STREAM.toString(), inputStream);
//上传至OSS
Result response = UploadUtils.uploadZipFile(file,"xxx","xxx","historyVideo", 36500,true);

注意:UploadUtils是自己封装的OSS工具类

你可能感兴趣的:(遇到的问题)