Commit cc9cd29f authored by unset's avatar unset

Merge remote-tracking branch 'origin/dev' into dev

parents 92495750 060c889a
......@@ -48,13 +48,34 @@ public class GtdataController extends CommonBaseController implements UserRestIn
@IgnoreUserToken
public void queryAreaInfoByAreaId() throws Exception {
String url = request.getRequestURI();
String fileName = url.substring(url.lastIndexOf("/")+1)+ System.currentTimeMillis();
String filePath = "https://w173.obtdata.com/image//data/HEM2/2019/11/18/HEM2_20191118235223_0010_L1B_CMOS1/HEM2_20191118235223_0010_L1B_CMOS1_800_800.png?op=OPEN";
String fileName = url.substring(url.lastIndexOf("/")+1);
String filePath = "/rscloudmart/bg/upload/2021-01-05/1609838996306.png";
//String filePath = "https://w173.obtdata.com/image//data/HEM2/2019/11/18/HEM2_20191118235223_0010_L1B_CMOS1/HEM2_20191118235223_0010_L1B_CMOS1_800_800.png?op=OPEN";
//String filePath = "https://box.bdimg.com/static/fisp_static/common/img/searchbox/logo_news_276_88_1f9876a.png";
// String filePath = "/obt/thumbnail/"+ url.substring(url.lastIndexOf("/app/unauth/image/")+18);
// String filePath = "/obt/thumbnail/data/VDM2/20200613/VDM2_20200525232637_0015_L1_MSS_CMOS5/VDM2_20200525232637_0015_L1_MSS_CMOS5_98_98.jpg";
// filePath = gtDataRestClient.openUrl(filePath);
downloadVideoById(fileName, filePath, getResponse());
// downloadVideoById(fileName, filePath, getResponse());
OutputStream out = null;
try {
Map<String, Object> result = gtDataRestClient.open(filePath);
byte[] content = (byte[]) result.get("file");
getResponse().setContentLength(content.length);
// response.setContentType("image/jpeg");
// if(isdownload){
// response.setContentType("application/octet-stream");
// String savedName = request.getParameter("savedName");
// if (savedName!=null && savedName.length()>0) {
// savedName = URLEncoder.encode(savedName,"UTF-8");
// response.addHeader("Content-Disposition","attachment;filename=" + savedName);
// }
// }
// 得到想客服端输出的输出流
out = getResponse().getOutputStream();
out.write(content);
}finally {
out.close();
}
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment