增加上传、下载client和api代码

This commit is contained in:
昕有灵犀
2018-08-01 15:36:54 +08:00
parent ecf223609d
commit c65f42d832
4 changed files with 12 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ storage.debug = true
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
storage.location = uploadfiledir
storage.downloadto = d://downloadfile//
storage.downloadurl = http://localhost:9091/files/
# \u662f\u5426\u91cd\u65b0\u547d\u540d\u6587\u4ef6\u540d\uff0c\u5982\u679c\u662f\u4e2a\u4eba\u6587\u4ef6\u5219\u91cd\u547d\u540d\u4e3a\uff1ausername_ + \u539f\u6587\u4ef6\u540d\uff1b\u5982\u679c\u662f\u7fa4\u7ec4\u6587\u4ef6\u5219\u91cd\u547d\u540d\u4e3a\uff1agroupid_ + \u539f\u6587\u4ef6\u540d #
storage.rename = true

View File

@@ -208,8 +208,7 @@ public class FileUploadDownloadController {
Boolean downloadSuccess = false;
downloadSuccess = HttpHelper.executeDownloadFile(HttpHelper.createHttpClient(),
"http://localhost:9091/files/wangxin_Tigase开发文档.doc", //服务器文件
//"/files/"+filename, //服务器文件
prop.getDownloadurl() + filename, //服务器文件
prop.getDownloadto() + filename, //下载到本地的文件
"UTF-8",
true);

View File

@@ -7,6 +7,7 @@ public class StorageProperties {
private String location = "uploadfiles";
private String downloadto ="";
private String downloadurl ="";
private boolean rename = true;
private String downloadfrom = "";
private String template = "thymeleaf";
@@ -271,4 +272,12 @@ public class StorageProperties {
public void setTemplate(String template) {
this.template = template;
}
public String getDownloadurl() {
return downloadurl;
}
public void setDownloadurl(String downloadurl) {
this.downloadurl = downloadurl;
}
}

View File

@@ -11,6 +11,7 @@ storage.debug = true
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
storage.location = uploadfiledir
storage.downloadto = d://downloadfile//
storage.downloadurl = http://localhost:9091/files/
# \u662f\u5426\u91cd\u65b0\u547d\u540d\u6587\u4ef6\u540d\uff0c\u5982\u679c\u662f\u4e2a\u4eba\u6587\u4ef6\u5219\u91cd\u547d\u540d\u4e3a\uff1ausername_ + \u539f\u6587\u4ef6\u540d\uff1b\u5982\u679c\u662f\u7fa4\u7ec4\u6587\u4ef6\u5219\u91cd\u547d\u540d\u4e3a\uff1agroupid_ + \u539f\u6587\u4ef6\u540d #
storage.rename = true