# Storage Kit

### Storage Manager Service (IPFS)

The Storage Manager Service provides methods for uploading and retrieving files using IPFS.

#### Table of Contents

* uploadFile
* getFileDetails

#### uploadFile

Uploads a file to IPFS.

**Parameters:**

* `fileStream` (Buffer): The file stream or data to upload.

**Usage:**

```javascript
const fileStream = fs.readFileSync("./resources/test.jpeg");
const uploadFileStatus = await StorageMgrService.uploadFile(fileStream);
console.log(uploadFileStatus);
```

#### getFileDetails

Retrieves details of files stored in IPFS.

**Parameters:**

* `page` (number): The page number of the file list (optional, default: 1).
* `limit` (number): The maximum number of files to retrieve per page (optional, default: 10).

**Usage:**

```javascript
const getFileDetailsStatus = await StorageMgrService.getFileDetails(1, 5);
console.log(JSON.stringify(getFileDetailsStatus));
```

***

These methods allow you to upload files to IPFS and retrieve file details stored in IPFS. Provide the necessary parameters based on your requirements and utilize the returned data as needed.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.krypcore.com/dev-docs/sdk-reference/core-service-methods/storage-kit.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
