getDetailFile()

Before getting each file type, we use this method to get some information necessary.

Syntax

getDetailFile: (id: string | number)

Params

Example

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

const getFile = async (id, token) => {
 try {
   let id = "244231";
   const response = await getDetailFile(id);
   console.log(response);
 } catch (error) {
   console.log(error);
 }
};

Response

    "data": {
        "id": "244231",
        "name": "images (7).jpeg",
        "nameNo": 7,
        "url": "https://node1-gateway-ipfs.eueno.io/ipfs/QmcWke...aDPMd",
        "backupUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmcWke...1Y5aDPMd",
        "size": "5650",
        "mimeType": "image/jpeg",
        "method": "ENCRYPT",
        "torrentSize": 4,
        "torrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmRU5c...pSaDHnHk",
        "backupTorrentUrl": "https://node1-gateway-ipfs.eueno.io/ipfs/QmRU5c...pSaDHnHk",
        "encryptKey": "4c4bc4e...a54cda641",
        "createdAt": "2023-04-11T11:34:08.954Z",
        "updatedAt": "2023-04-11T11:34:11.324Z"
    }

Last updated