Add attachment preview url based on ViewerJS

The viewerJS library can display PDF files easily using pdfjs. Another
attachment route redirects to the viewerjs application to display the
current attachment.

The attachment responses have been improved in that now the response
headers are added to all responses. Additional a HEAD route has been
added to support the viewerJS application.
This commit is contained in:
Eike Kettner
2020-02-08 17:51:47 +01:00
parent e1826f39ac
commit 8908ad2561
3 changed files with 92 additions and 15 deletions

View File

@ -26,6 +26,10 @@ object Dependencies {
val StanfordNlpVersion = "3.9.2"
val TikaVersion = "1.23"
val YamuscaVersion = "0.6.1"
val SwaggerUIVersion = "3.24.3"
val SemanticUIVersion = "2.4.1"
val JQueryVersion = "3.4.1"
val ViewerJSVersion = "0.5.8"
val emil = Seq(
"com.github.eikek" %% "emil-common" % EmilVersion,
@ -149,9 +153,10 @@ object Dependencies {
val betterMonadicFor = "com.olegpy" %% "better-monadic-for" % BetterMonadicForVersion
val webjars = Seq(
"swagger-ui" -> "3.24.3",
"Semantic-UI" -> "2.4.1",
"jquery" -> "3.4.1"
).map({case (a, v) => "org.webjars" % a % v })
"org.webjars" % "swagger-ui" % SwaggerUIVersion,
"org.webjars" % "Semantic-UI"% SemanticUIVersion,
"org.webjars" % "jquery" % JQueryVersion,
"org.webjars" % "viewerjs" % ViewerJSVersion
)
}