当前位置:网站首页>Get the Qiniu cloud address file and save it locally
Get the Qiniu cloud address file and save it locally
2022-07-29 22:15:00 【~Memories】
qiniuImagePath:Images of seven cows address path
public Map<String, String> waterImage(String qiniuImagePath, String address) {
String fileid = "";
try {
String projectPath = (String) MAppContext.getGlobalVariable(MAppContext.GLOBAL_VARIABLE_PROJECTPATH);
String finalImageWater = projectPath + "/WEB-INF/template/waterImageFinal.jpg";
URL url = new URL(qiniuImagePath);
File dirfile = new File(projectPath);
if (!dirfile.exists()) {
dirfile.mkdirs();
}
FileUtils.copyURLToFile(url, new File(projectPath + "/WEB-INF/template/image.jpg"));
//To upload the file name seven cows
fileid = 111;
//上传到七牛
QiniuFileUtil.upload(new File(finalImageWater), fileid);
} catch (Exception e) {
e.printStackTrace();
}
Map<String, String> result = new HashMap<>();
result.put("field", fileid);
return result;
}
边栏推荐
- 华为畅享50 Pro评测:HarmonyOS加持 更流畅更安全
- WeChat Mini Program 30 Customizing Templates and Obtaining User Login Credentials
- 网络通信编程基础,BIO,NIO
- WeChat Mini Program 31 Subcontracting Mechanism
- 940. Different subsequences II
- MySQL Data Query - Union Query
- 336. 回文对
- mdnice-test
- 网站ping端口的操作方法和命令介绍
- MySQL - Design game user information table
猜你喜欢
随机推荐
第3章业务功能开发(线索关联市场活动,插入数据并查询)
In 2022, you still can't "low code"?Data science can also play with Low-Code!
品牌广告投放平台的中台化应用与实践
LeetCode--单链表--146.LRU缓存
初识网络的简单概念
全系都更换带T四缸,安全、舒适一个不落
在Ferora35中安装oracle-database-xe-21c
[ACTF2020 Freshman Competition]Exec 1
高通WLAN框架学习(31)-- Power save
给图片左上角加logo标识、左下角加时间和地址、地址到达指定长度换行
太卷了,企业级的智慧物业系统,也完全开源....
针对自动识别大麦网滑块验证码,提出解决方案,并进行分析、总结
使用脚本安装mysql
刚重装的win7系统不能上网(深度系统安装步骤)
Come in now!!!Take you to know the basic data types of C language
分析少年派2中的Crypto
LeetCode 593 有效的正方形[数学] HERODING的LeetCode之路
【点云】M3DeTR: Multi-representation, Multi-scale, Mutual-relation 3D Object Detection with Transformers
容器网络硬核技术内幕 (26) 知微知彰,知柔知刚 (下)
怎么实现您的个人知识库?







![[ACTF2020 Freshman Competition]Exec 1](/img/1e/a3c19d514207e6965d09c66b86e519.png)

