1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 12:30:06 +00:00

fix: comments and logic tidy up

This commit is contained in:
Allan Bowe
2022-02-22 08:38:25 +00:00
parent d9cb2db61f
commit 487cb489f3
3 changed files with 33 additions and 6 deletions

View File

@@ -1,6 +1,15 @@
import * as NodeFormData from 'form-data'
import { convertToCSV } from '../utils/convertToCsv'
/**
* One of the approaches SASjs takes to send tables-formatted JSON (see README)
* to SAS is as multipart form data, where each table is provided as a specially
* formatted CSV file.
* @param formData Different objects are used depending on whether the adapter is
* running in the browser, or in the CLI
* @param data Special, tables-formatted JSON (see README)
* @returns Populated formData
*/
export const generateFileUploadForm = (
formData: FormData | NodeFormData,
data: any