Helper for creating a File to pass to an SDK upload method from a variety of different data formats
toFile(
value: ToFileInput | PromiseLike<ToFileInput>,
name: string | null,
options: FilePropertyBag
): Promise<File>| Name | Type | Description |
|---|---|---|
value* | ToFileInput | PromiseLike<ToFileInput> | the raw content of the file. Can be an Uploadable, BlobLikePart, or AsyncIterable of BlobLikeParts |
name | string | null | the name of the file. If omitted, toFile will try to determine a file name from bits if possible |
options | FilePropertyBag | additional properties |