开发者社区> 问答> 正文

将网站放在阿里云上,之后点击图片下载,图片下载在阿里云的D盘上,如何才能让图片下载到用户的电脑上?

将网站放在阿里云上,之后点击图片下载,图片下载在阿里云的D盘上,如何才能让图片下载到用户的电脑上?

部分代码如下:

String savePath = "D:\upload\";
File downloadFile1 = new File(savePath);
if (!downloadFile1.exists()) {
downloadFile1.mkdirs();
}
File file1 = new File(savePath + "\" + filename + "." + format);
if (!ImageIO.write(image, format, file1)) {
throw new IOException("Could not write an image of format " + format + " to " + file1);
}

遇到了同样的问题,在CSDN看到了,希望阿里云团队能够给出正确、标准的答案~请查看

展开
收起
刘刚_ 2020-05-23 15:53:07 875 0
0 条回答
写回答
取消 提交回答
问答地址:
问答排行榜
最热
最新

相关电子书

更多
阿里云 年度游戏安全报告 立即下载
阿里云年度游戏安全报告2017.3-2018.3 立即下载
阿里云搜索产品年度升级发布 立即下载