|
|
@ -35,9 +35,7 @@ module.exports = { |
|
|
|
try { |
|
|
|
const { filename } = ctx.request.query; |
|
|
|
const fkey = decodeURI(ctx.path.slice(fetchUrl.length + 1)).replace(/\.json$/, '.js'); |
|
|
|
console.log(fkey); |
|
|
|
const publicDownloadUrl = await app.fs.attachment.download(fkey); |
|
|
|
console.log("publicDownloadUrl:", publicDownloadUrl); |
|
|
|
ctx.status = 200; |
|
|
|
if (filename) ctx.attachment(filename); |
|
|
|
ctx.body = request.get(publicDownloadUrl); |
|
|
|