Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dmp
OpenAIRE-EUDAT-DMP-service-pilot
Commits
895dbcf0
Commit
895dbcf0
authored
Jul 07, 2021
by
Diamantis Tziotzios
Browse files
Revert "user guide path fix"
This reverts commit
bd15b1e2
.
parent
bd15b1e2
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
dmp-backend/web/src/main/java/eu/eudat/controllers/UserGuideController.java
View file @
895dbcf0
...
...
@@ -50,12 +50,13 @@ public class UserGuideController {
}
InputStream
is
=
new
FileInputStream
(
fileName
);
Path
path
=
Paths
.
get
(
fileName
);
String
[]
filepath
=
fileName
.
split
(
"\\."
)[
0
].
split
(
"\\\\"
);
String
simplename
=
filepath
[
filepath
.
length
-
1
];
HttpHeaders
responseHeaders
=
new
HttpHeaders
();
responseHeaders
.
setContentLength
(
is
.
available
());
responseHeaders
.
setContentType
(
MediaType
.
TEXT_HTML
);
responseHeaders
.
set
(
"Content-Disposition"
,
"attachment;filename="
+
path
.
getFi
le
N
ame
().
toString
()
);
responseHeaders
.
set
(
"Content-Disposition"
,
"attachment;filename="
+
simp
le
n
ame
);
responseHeaders
.
set
(
"Access-Control-Expose-Headers"
,
"Content-Disposition"
);
responseHeaders
.
get
(
"Access-Control-Expose-Headers"
).
add
(
"Content-Type"
);
...
...
@@ -70,7 +71,7 @@ public class UserGuideController {
@RequestMapping
(
value
=
"current"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
ResponseEntity
<
ResponseItem
<
String
>>
updateGuide
(
@RequestBody
UserGuide
guide
,
@ClaimedAuthorities
(
claims
=
{
ADMIN
})
Principal
principal
)
throws
Exception
{
String
fileName
=
this
.
environment
.
getProperty
(
"userguide.path"
)
+
guide
.
getName
();
String
fileName
=
this
.
environment
.
getProperty
(
"userguide.path"
)
+
guide
.
getName
()
+
".html"
;
OutputStream
os
=
new
FileOutputStream
(
fileName
);
os
.
write
(
guide
.
getHtml
().
getBytes
());
os
.
close
();
...
...
user-guide/UserGuide_pt.html
deleted
100644 → 0
View file @
bd15b1e2
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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