feat(PDF):Add PDF viewer (#2730)
Display DICOM encapsulated PDF documents in a PDF viewer. Addressed the remaining PR comments, and am merging this.
This commit is contained in:
1 parent
f3822f98a3
commit
82df3eac03
23 files changed
+376
-71
No files matched your search
@@ -24,12 +24,16 @@ const ENTRY_TARGET = process.env.ENTRY_TARGET || `${SRC_DIR}/index.js`;
|
||||
const Dotenv = require('dotenv-webpack');
|
||||
|
||||
const setHeaders = (res, path) => {
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
if (path.indexOf('.gz') !== -1) {
|
||||
res.setHeader('Content-Encoding', 'gzip')
|
||||
} else if (path.indexOf('.br') !== -1) {
|
||||
res.setHeader('Content-Encoding', 'br')
|
||||
}
|
||||
if (path.indexOf('.pdf') !== -1) {
|
||||
res.setHeader('Content-Type', 'application/pdf');
|
||||
} else {
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = (env, argv) => {
|
||||
|
||||
Reference in new issue
Block a user