Eueno
  • EUENO – Decentralized Encrypting Blockchain Oracles for Web3
    • Litepaper
    • Use Cases
  • Get Started
    • Prerequisites
    • Buckets
      • Create a bucket
      • Delete a bucket
    • Files
      • Upload a file
      • View a file
      • Delete a file
      • Share a file
  • Pricing
  • Eueno libraries
    • @eueno/lib-browser
      • Installation
      • Setup
      • Create key (generate a key for encrypting the file(s))
      • login()
      • useEuenoContext()
      • getUserInfo()
      • updateUserInfo()
      • createProject()
      • getProjectInfo()
      • getProjects()
      • getFilesListByFolder()
      • deleteProject()
      • createFolder()
      • uploadFolder()
      • Get folder detail
      • deleteFolder()
      • uploadFile()
      • uploadFileWithSignedUrl()
      • getCid()
      • getFileById()
      • getFileListById()
      • Get file detail
        • getDetailFile()
        • getDetailUnencryptedFile()
        • getDetailEncryptedFile()
      • getDetailMultiEncryptedFiles()
      • deleteFile()
      • shareFile()
      • shareMultiFile()
      • deleteSharePermission()
      • getShareList()
      • getShareListToMe ()
    • @eueno/lib-node
      • Create eueno client
      • Create project key
      • Create project
      • Upload file
      • Upload folder
      • Get file
      • Get list file
      • Share file
      • Get shared files
      • Create folder
      • Create Account
      • Decrypt Get Key Aes
      • Decrypt File by Key Aes
  • Policies
    • Privacy Policy
    • Terms of Service
Powered by GitBook
On this page
  • Syntax
  • Parameters
  • Example
  1. Eueno libraries
  2. @eueno/lib-browser

getCid()

Syntax

getCid(file: File, exportedKey?: string)

This method used to get cidFile and cidTorrentFile

Parameters

Name
Type
Required
Description

file

File

Yes

File upload

exportedKey

string

No

Require if file encrypted

Example

import {getCid} from "@eueno/lib-browser";

const getData = async () => {
   const file = files[0];
   const exportedKey = "4R2Bw-kz9DnWA5FEcoopIsPhZZ5PswLBvtPwll6ejkU"
   
   const response = await getCid(file, exportedKey);
    
    console.log(response);
 };

Response of example:

{
    data: {
     cidFile: "QmWYXyKrnpd94hVr4rh84q3MLfLfSMrk1MmuAW2Uj3Dv6X"
     cidTorrentFile: "QmNxPpQkyK8x1ne3izWY7VRKw8LY7j4tVfaGfo5CMuuNpK"   
    },
    status: 200
}

PreviousuploadFileWithSignedUrl()NextgetFileById()

Last updated 1 year ago