The method used to upload files in Eueno. We have two types to upload are encrypted and unencrypted.
Parameters
Name
Type
Required
Description
Type UploadFileOptions has the structure like this:
interfaceUploadOptions { file:File; path:string[]; // Path file projectId:string; uploadType:UploadType; inFolder:boolean; exportedKey?:string; // Need if encryptonUploadProgress: () =>void; // Progress upload file, account:string;}exportinterfaceUploadFileOptionsextendsUploadOptions { isLargeFile?:boolean; // file's size > 20MB chunkSize?:number; // size of each chunk part, recommend 5MB uploadUrl?:UploadUrl; // must be ignored when uploading a single filecallback?: ( bufferData:BufferData, webseed:string[], account:string ) =>void; // callback must be ignored when uploading a single file}
Example
Example using ReactJS with Axios. Assuming that, you have a project named Project1 with id is “112”, inside this project we have Folder1, and inside Folder1 we have Folder2. So the path is like this: Project1/Folder1/Folder2. The code below shows how to upload a file by encrypt method in Folder2.