wip
This commit is contained in:
parent
61f21594a9
commit
22d2f2051c
10 changed files with 40 additions and 26 deletions
|
|
@ -83,12 +83,6 @@ export default function(readable: stream.Readable, type: string, ctx: Koa.Contex
|
|||
ctx.set('Content-Disposition', 'attachment');
|
||||
}
|
||||
|
||||
ctx.set('Cache-Control', 'max-age=31536000, immutable');
|
||||
ctx.set('Content-Type', data.contentType);
|
||||
|
||||
data.stream.pipe(ctx.res);
|
||||
|
||||
data.stream.on('end', () => {
|
||||
ctx.res.end();
|
||||
});
|
||||
ctx.body = data.stream;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue