增加上传、下载client和api代码
This commit is contained in:
@@ -11,6 +11,7 @@ storage.debug = true
|
|||||||
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
|
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
|
||||||
storage.location = uploadfiledir
|
storage.location = uploadfiledir
|
||||||
storage.downloadto = d://downloadfile//
|
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 #
|
# \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
|
storage.rename = true
|
||||||
|
|||||||
@@ -208,8 +208,7 @@ public class FileUploadDownloadController {
|
|||||||
|
|
||||||
Boolean downloadSuccess = false;
|
Boolean downloadSuccess = false;
|
||||||
downloadSuccess = HttpHelper.executeDownloadFile(HttpHelper.createHttpClient(),
|
downloadSuccess = HttpHelper.executeDownloadFile(HttpHelper.createHttpClient(),
|
||||||
"http://localhost:9091/files/wangxin_Tigase开发文档.doc", //服务器文件
|
prop.getDownloadurl() + filename, //服务器文件
|
||||||
//"/files/"+filename, //服务器文件
|
|
||||||
prop.getDownloadto() + filename, //下载到本地的文件
|
prop.getDownloadto() + filename, //下载到本地的文件
|
||||||
"UTF-8",
|
"UTF-8",
|
||||||
true);
|
true);
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ public class StorageProperties {
|
|||||||
|
|
||||||
private String location = "uploadfiles";
|
private String location = "uploadfiles";
|
||||||
private String downloadto ="";
|
private String downloadto ="";
|
||||||
|
private String downloadurl ="";
|
||||||
private boolean rename = true;
|
private boolean rename = true;
|
||||||
private String downloadfrom = "";
|
private String downloadfrom = "";
|
||||||
private String template = "thymeleaf";
|
private String template = "thymeleaf";
|
||||||
@@ -271,4 +272,12 @@ public class StorageProperties {
|
|||||||
public void setTemplate(String template) {
|
public void setTemplate(String template) {
|
||||||
this.template = template;
|
this.template = template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDownloadurl() {
|
||||||
|
return downloadurl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDownloadurl(String downloadurl) {
|
||||||
|
this.downloadurl = downloadurl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ storage.debug = true
|
|||||||
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
|
# \u5b58\u50a8\u7684\u76f8\u5bf9\u8def\u5f84\uff0c\u5982\u679c storage.source = xyfs \u9700\u8981\u914d\u7f6e #
|
||||||
storage.location = uploadfiledir
|
storage.location = uploadfiledir
|
||||||
storage.downloadto = d://downloadfile//
|
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 #
|
# \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
|
storage.rename = true
|
||||||
|
|||||||
Reference in New Issue
Block a user