feat: Export collection as direct download instead of emailing (#1001)
* feat: Export collection as zip instead of emailing * Flow typing download.js
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
// @flow
|
||||
import stream from 'stream';
|
||||
import { type Context } from 'koa';
|
||||
|
||||
export default function apiWrapper() {
|
||||
@ -10,7 +11,10 @@ export default function apiWrapper() {
|
||||
|
||||
const ok = ctx.status < 400;
|
||||
|
||||
if (typeof ctx.body !== 'string') {
|
||||
if (
|
||||
typeof ctx.body !== 'string' &&
|
||||
!(ctx.body instanceof stream.Readable)
|
||||
) {
|
||||
// $FlowFixMe
|
||||
ctx.body = {
|
||||
...ctx.body,
|
||||
|
Reference in New Issue
Block a user