diff options
author | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-05-19 00:43:08 -0400 |
---|---|---|
committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2021-05-19 00:43:08 -0400 |
commit | d5f5dfee3c9293515521bcc9a26064aab90880b9 (patch) | |
tree | 7a4ada453a7318f2bcdba9d521711342d2fda389 /src/client/Network.ts | |
parent | 7c18243dd38656b63334f48d9270d912ce6384fa (diff) | |
parent | 6919954467f3f2e4ca2f02e34eda827df9f5f83d (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into sharing_scenario
Diffstat (limited to 'src/client/Network.ts')
-rw-r--r-- | src/client/Network.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/client/Network.ts b/src/client/Network.ts index 6982ecf19..bf2918734 100644 --- a/src/client/Network.ts +++ b/src/client/Network.ts @@ -36,4 +36,14 @@ export namespace Networking { return response.json(); } + export async function UploadYoutubeToServer<T extends Upload.FileInformation = Upload.FileInformation>(videoId: string): Promise<Upload.FileResponse<T>[]> { + const parameters = { + method: 'POST', + body: JSON.stringify({ videoId }), + json: true + }; + const response = await fetch("/uploadYoutubeVideo", parameters); + return response.json(); + } + }
\ No newline at end of file |