Method to upload a folder in the project. We have two types to upload: encrypted and unencrypted. If you upload a file with encrypt type, you will need to generate a key to encrypt data. See how to generate a key in this.
This method also allows uploading multiple files.
Parameters
Name
Type
Required
Description
Type UploadFolderOptions has structure looks as below:
exportconstUPLOAD_TYPE= ["UNENCRYPTED","ENCRYPT"];exporttypeUploadType=typeofUPLOAD_TYPE[number];exportinterfaceUploadFolderOptionsextendsOmit<UploadOptions,"file"> { files:FileList|File[];}interfaceUploadOptions { 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 encryptonUploadProgress: () =>void; // Progress upload file, account:string;}
Example
This example describes how to upload folder encrypt in Eueno. First, you need to generate a key (exportedKey parameter) to encrypt (if uploadType is unencrypted, we will don’t need the key). See how to generate a key in Create key. After that, we have an exportedKey for encrypt folder that you uploaded.