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

getFileListById()

Syntax

getFileListById(ids: Array<string> | Array<number>, token?: string)

The method gets a list of file information by file ID.

Parameters

Name
Type
Required
Description

ids

Array<string> or Array<number>

Yes

Array of file id.

token

string

No

The authentication token response from Eueno API when login. After login, this token was saved in local storage with the name “eueno-token".

Example

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

const getDetailFiles = async () => {
let id = "20086";
 try {
   const response = await getFileListById(id);
   console.log(response?.data?.data);
 } catch (error) {
   console.log(error);
 }
};

Response of example:

"data": [
      {
            "id": "20086",
            "name": "loading-icon (1).png",
            "nameNo": 1,
            "virtualPath": "0xa4ea6...bf0e65c8a32/new/loading-icon (1).png",
            "virtualCloudPath": "0xa4ea61c9...89531-f882d37lllmz.loading-icon (1).png",
            "path": "0xa4ea61c99...82d37lllmz.loading-icon (1).png",
            "url": "https://node1-gateway-ipfs.eueno.io/ipfs/Qm...34ASACrTRDbyLiWi3",
            "backupUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmVY...CrTRDbyLiWi3",
            "size": "26529",
            "mimeType": "image/png",
            "method": "ENCRYPT",
            "torrentSize": 4,
            "torrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmSU...Z2FNvgzkJ7",
            "backupTorrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmSUzA6...Z2FNvgzkJ7",
            "encryptKey": "af071851a69...b1a2a8ae52da43a76",
            "createdAt": "2023-05-30T04:26:30.629Z",
            "updatedAt": "2023-05-30T04:26:33.912Z"
        },
  ]
PreviousgetFileById()NextGet file detail

Last updated 2 years ago