graph.ts 452 字节
Newer Older
1
import {Request, Response} from 'express';
2

3 4 5 6 7 8 9 10 11
import fetch from 'isomorphic-unfetch';

const model = 'https://gitee.com/public_sharing/ObjectDetection-YOLO/raw/master/yolov3.cfg';

export default async (req: Request, res: Response) => {
    const result = await fetch(model);
    res.setHeader('Content-Type', 'application/octet-stream');
    res.setHeader('Content-Disposition', 'attachment; filename="yolov3.cfg"');
    return result.arrayBuffer();
P
Peter Pan 已提交
12
};