diff --git a/src/components/upload.ts b/src/components/upload.ts index 8f84e1a..f182740 100644 --- a/src/components/upload.ts +++ b/src/components/upload.ts @@ -1,3 +1,4 @@ +import path from 'path' import fetch, { Response } from 'node-fetch' import { IntervalError } from '..' import { T_IO_PROPS, T_IO_RETURNS } from '../ioSchema' @@ -8,6 +9,9 @@ export function file(_: T_IO_PROPS<'UPLOAD_FILE'>) { return { ...response, lastModified: new Date(response.lastModified), + get extension(): string { + return path.extname(response.name) + }, async url(): Promise { return url },