import { checkStatus, json, FileAPI } from '@drifthq/dapper' export function upload(file: any, accessToken: string) { const data = new FormData() data.append('file', file) return FileAPI .post('/upload', data, { raw: true, headers: {authorization: `bearer ${accessToken}`}, }) .then(checkStatus) .then(json) }