UNPKG

@onfido/api

Version:

Node.js library for the Onfido API

14 lines (13 loc) 333 B
import { readFileSync } from "fs"; export class FileTransfer { constructor(data, filename) { if (filename == null) { this.buffer = readFileSync(data); this.filename = data.toString(); } else { this.buffer = data; this.filename = filename; } } }