# getDetailFile()

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

### Syntax

```javascript
getDetailFile: (id: string | number)
```

### Params

<table><thead><tr><th width="107">Name</th><th width="169">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string or number</td><td>Yes</td><td>The file id.</td></tr></tbody></table>

### Example

```javascript
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

```json
    "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"
    }
```
