mirror of
https://github.com/mollersuite/monofile.git
synced 2024-11-21 21:36:26 -08:00
cool
This commit is contained in:
parent
3b4fba797d
commit
81378fc0dc
|
@ -181,6 +181,7 @@ let fgRQH = async (req:express.Request,res:express.Response) => {
|
||||||
|
|
||||||
let file = files.getFilePointer(req.params.fileId)
|
let file = files.getFilePointer(req.params.fileId)
|
||||||
res.setHeader("Access-Control-Allow-Origin", "*")
|
res.setHeader("Access-Control-Allow-Origin", "*")
|
||||||
|
if (req.query.attachment == "1") res.setHeader("Content-Disposition", "attachment")
|
||||||
|
|
||||||
if (file) {
|
if (file) {
|
||||||
|
|
||||||
|
@ -244,6 +245,7 @@ let fgRQH = async (req:express.Request,res:express.Response) => {
|
||||||
let fgwh = (req: express.Request, res:express.Response) => {
|
let fgwh = (req: express.Request, res:express.Response) => {
|
||||||
let file = files.getFilePointer(req.params.fileId)
|
let file = files.getFilePointer(req.params.fileId)
|
||||||
res.setHeader("Access-Control-Allow-Origin", "*")
|
res.setHeader("Access-Control-Allow-Origin", "*")
|
||||||
|
if (req.query.attachment == "1") res.setHeader("Content-Disposition", "attachment")
|
||||||
if (!file) {
|
if (!file) {
|
||||||
res.status(404)
|
res.status(404)
|
||||||
res.send()
|
res.send()
|
||||||
|
|
Loading…
Reference in a new issue