uploadFolder()
Syntax
uploadFolder(token: string, publicKey: string, account: string, options: UploadFolderOptions)Parameters
Name
Type
Required
Description
export const UPLOAD_TYPE = ["UNENCRYPTED", "ENCRYPT"];
export type UploadType = typeof UPLOAD_TYPE[number];
export interface UploadFolderOptions extends Omit<UploadOptions, "file"> {
files: FileList | File[];
}
interface UploadOptions {
file: File;
path: string[]; // Path file
projectId: string;
uploadType: UploadType; //"UNENCRYPTED" : "ENCRYPT"
inFolder: boolean; // true - if upload folder, false - if upload file(s)
exportedKey?: string; // Need if encrypt
onUploadProgress: () => void; // Progress upload file,
account: string;
}Example
Last updated