document link disable

This commit is contained in:
2022-02-16 07:17:20 +00:00
parent bfc4a7f3ab
commit f7dd728696
39 changed files with 2021 additions and 2079 deletions
+9 -1
View File
@@ -64,6 +64,9 @@ export default async function ApiProxy(req, res) {
configDocument(token.access_token)
)
.then((response) => {
const bytes = response.data.byteLength;
console.log(bytes);
res.setHeader(
"content-disposition",
"attachment; filename=" +
@@ -71,7 +74,12 @@ export default async function ApiProxy(req, res) {
"filename="
)[1]
);
res.status(200).send(response.data);
return res.status(200).send(response.data);
})
.then(() => {
console.log("has downloaded");
return "downloadComplete";
})
.catch(({ err }) => {
res.status(400).json(err);
@@ -1,6 +1,7 @@
import axios from "axios";
import CryptoJS from "crypto-js";
import { getToken, azureHeaders } from "../../../actions";
import { getSelectQuery } from "../../../actions/selectQueryTypes";
const WORDKEY = process.env.HASHKEY;
+1 -1
View File
@@ -21,7 +21,7 @@ const hashAPIPath = (queryPath) => {
};
export default async function ApiProxy(req, res) {
var data = req.body;
var data = JSON.stringify(req.body);
var appealObj = req.query.appealObj;
var incidentID = req.query.incident;