UNPKG

1.43 kBTypeScriptView Raw
1/**
2 * -------------------------------------------------------------------------------------------
3 * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
4 * See License in the project root for license information.
5 * -------------------------------------------------------------------------------------------
6 */
7/// <reference types="node" />
8import { FileObject, SliceType } from "../../LargeFileUploadTask";
9import { Range } from "../Range";
10/**
11 * @class
12 * Class used for creating LargeFileUploadTask fileobject.
13 * This class accepts files of type ArrayBuffer, Blob, Buffer.
14 */
15export declare class FileUpload implements FileObject<SliceType> {
16 content: ArrayBuffer | Blob | Buffer;
17 name: string;
18 size: number;
19 /**
20 * @public
21 * @constructor
22 * @param {ArrayBuffer | Blob | Buffer} content - The file to be uploaded
23 * @param {string} name - The name of the file to be uploaded
24 * @param {number} size - The total size of the file to be uploaded
25 * @returns An instance of the FileUpload class
26 */
27 constructor(content: ArrayBuffer | Blob | Buffer, name: string, size: number);
28 /**
29 * @public
30 * Slices the file content to the given range
31 * @param {Range} range - The range value
32 * @returns The sliced file part
33 */
34 sliceFile(range: Range): ArrayBuffer | Blob | Buffer;
35}