-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathupload.ts
More file actions
23 lines (21 loc) · 765 Bytes
/
upload.ts
File metadata and controls
23 lines (21 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import {AsperaSdkTransfer, TransferSpec} from '../models/models';
import {asperaSdk} from '../index';
import {throwError} from '../helpers/helpers';
import {messages} from '../constants/messages';
/**
* HTTP Gateway Upload Logic
*
* @param transferSpec - TransferSpec for the upload
*
* @returns Promise that resolves on success invoke or rejects if unable to start
*
* @remarks
* Most logic is called directly by Desktop SDK functions
* You may not need to import anything from this file.
*/
export const httpUpload = (transferSpec: TransferSpec): Promise<AsperaSdkTransfer> => {
if (!asperaSdk.supportsHttpGateway) {
return throwError(messages.serverNotVerified, {type: 'upload'});
}
return Promise.reject('TODO: HTTP Upload Not Ready');
};