Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
cc9cd29f
Commit
cc9cd29f
authored
Jan 05, 2021
by
unset
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
parents
92495750
060c889a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
4 deletions
+25
-4
GtdataController.java
.../upyuns/platform/rs/datacenter/rest/GtdataController.java
+25
-4
No files found.
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/GtdataController.java
View file @
cc9cd29f
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment