document link disable
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user