diff options
author | Geireann Lindfield Roberts <60007097+geireann@users.noreply.github.com> | 2022-06-30 12:42:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 12:42:10 -0700 |
commit | fee343f6a4103661a9aeea1eefe94058a9a074c6 (patch) | |
tree | f4b18b179c6b94edb672405e09ea453fbea80b5e /src/client/Network.ts | |
parent | ea6e63648b21c46672b1b7cb1da0cbaa6857d0c1 (diff) | |
parent | 03c958f8ac95c65e77c337c6ecc4cd6b49f79175 (diff) |
Merge pull request #70 from brown-dash/data-visualization-view-naafi
Data visualization view naafi
Diffstat (limited to 'src/client/Network.ts')
-rw-r--r-- | src/client/Network.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/Network.ts b/src/client/Network.ts index 3597e7b2b..224420125 100644 --- a/src/client/Network.ts +++ b/src/client/Network.ts @@ -18,6 +18,13 @@ export namespace Networking { return requestPromise.post(options); } + /** + * Handles uploading basic file types to server and makes the API call to "/uploadFormData" endpoint + * with the mapping of GUID to filem as parameters. + * + * @param files the files to be uploaded to the server + * @returns the response as a json from the server + */ export async function UploadFilesToServer<T extends Upload.FileInformation = Upload.FileInformation>(files: File | File[]): Promise<Upload.FileResponse<T>[]> { const formData = new FormData(); if (Array.isArray(files)) { |