1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 20:40:05 +00:00

fix(file-upload-form): fixed form data for node env

This commit is contained in:
Yury Shkoda
2023-07-06 15:49:24 +03:00
parent 22edcb0a8e
commit 0d9ba36de8
7 changed files with 113 additions and 41 deletions

5
src/utils/getFormData.ts Normal file
View File

@@ -0,0 +1,5 @@
import { isNode } from './'
import * as NodeFormData from 'form-data'
export const getFormData = () =>
isNode() ? new NodeFormData() : new FormData()