1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 19x | /* @flow */ import type { MethodApi, FileLocal } from "../types"; import type { DownloadOptions } from "../../api/types"; export default ({ client }: MethodApi) => ( fileid: number, filename: string, options: DownloadOptions = {} ): Promise<FileLocal> => { const { getfilelink, download } = client; return getfilelink(fileid).then(download(filename, options)); }; |