# @syncfusion/ej2-filemanager-ibm-cos-node-file-provider

> Essential JS 2 File Manager IBM Cloud Object Storage File Provider

Latest version **18.1.42** (published 2020-04-02) · SEE LICENSE IN license license · 0 weekly downloads

## Install

```sh
npm install @syncfusion/ej2-filemanager-ibm-cos-node-file-provider
pnpm add @syncfusion/ej2-filemanager-ibm-cos-node-file-provider
yarn add @syncfusion/ej2-filemanager-ibm-cos-node-file-provider
bun add @syncfusion/ej2-filemanager-ibm-cos-node-file-provider
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 18.1.42 |
| Published | 2020-04-02 |
| First published | 2020-03-19 |
| Weekly downloads | 0 |
| License | SEE LICENSE IN license |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 56.2 KB |
| Known vulnerabilities | 0 (+11 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Syncfusion Inc. |
| Maintainers | essentialjs2, syncfusion-javascript, syncfusionorg |
| Keywords | ej2, syncfusion, ej2 file manager, Nodejs, File explorer, Folders/directory, file path, file upload, file browser, folder drag and drop, ibm-cos, IBM, Cloud Object Storage, File Provider |

## Links

- npm: https://www.npmjs.com/package/@syncfusion/ej2-filemanager-ibm-cos-node-file-provider
- Repository: https://github.com/SyncfusionExamples/ej2-filemanager-ibm-cos-node-file-provider
- Homepage: https://github.com/SyncfusionExamples/ej2-filemanager-ibm-cos-node-file-provider#readme
- Issues: https://github.com/SyncfusionExamples/ej2-filemanager-ibm-cos-node-file-provider/issues
- npm.io page: https://npm.io/package/@syncfusion/ej2-filemanager-ibm-cos-node-file-provider

## Dependencies (9)

- [cors](https://npm.io/package/cors.md) ^2.8.5
- [path](https://npm.io/package/path.md) ^0.12.7
- [config](https://npm.io/package/config.md) ^3.2.5
- [multer](https://npm.io/package/multer.md) ^1.4.1
- [express](https://npm.io/package/express.md) ^4.16.4
- [archiver](https://npm.io/package/archiver.md) ^3.0.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^8.1.0
- [body-parser](https://npm.io/package/body-parser.md) ^1.18.3
- [ibm-cos-sdk](https://npm.io/package/ibm-cos-sdk.md) ^1.6.0

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 18.1.42 (latest) — 2020-04-02
- 18.1.36-beta (next) — 2020-03-19

## README

# IBM Cloud Object Storage NodeJS file providers for Essential JS 2 File Manager

This repository contains the IBM Cloud Object Storage NodeJS file provider used for Essential JS 2 File Manager component.

## Key features

The IBM Cloud Object Storage file provider module allows you work with the IBM Cloud Object Storage. It also provides the methods for performing various file actions such as creating a new folder, renaming files, and deleting files.

The IBM Cloud Object Storage file provider serves the file providers support for the File Manager component with the IBM Cloud Object Storage.

The following actions can be performed in IBM Cloud Object Storage file provider.

| **Actions** | **Description** |
| --- | --- |
| Read     | Reads the files from IBM Cloud Object Storage. |
| Details  | Gets a file's details such as Type, Size, Location, and Modified date. |
| Upload   | Uploads a file in IBM Cloud Object Storage. It accepts uploaded media with the following characteristics: <ul><li>Maximum file size:  30MB</li><li>Accepted Media MIME types: `*/*` </li></ul> |
| Create   | Creates a new Folder. |
| Delete   | Deletes a folder or file. |
| Rename   | Renames a folder or file. |
| Search   | Searches a file or folder in IBM Cloud Object Storage. |
| Copy     | Copies the selected files or folders from target. |
| Move     | Moves the files or folders to the desired location. |
| Download | Downloads the selected file or folder.    |

## Prerequisites

To run the service, create an IBM Cloud Object Storage for accessing and storing the cloud objects as files or folders. Create an [IBM Cloud account](https://cloud.ibm.com/docs/services/cloud-object-storage/basics?topic=cloud-object-storage-provision) and then create Cloud Object Storage bucket to perform the file operations. Then, define the server credentials details such as `bucketname`, `endpoint`, `apiKeyId`, and `serviceInstanceId` within the `config/default.json` file found in the `config` folder as the following code snippet.

```

"bucketName": "Files",
"endpoint": "s3.xxxxxxxxxxxxxxxxxxxxxxxx.cloud",
"apiKeyId": "GMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxKGX",
"serviceInstanceId": "cxxn:v1:xxxxxxxxx:cloud-object-storage:xxxxxxxx:a/1651281f453343434e69c7fb70f38cd59b9:xxxxxxx-09xxe-xx-xxxx-a85eexxxxxaaf2e::"

```

## How to configure a web service

Follow these commands to configure the IBM Cloud Object Storage file providers.

- To install ej2-filemanager-ibm-cos-node-file-provider package, use the following command.

```sh

  npm install @syncfusion/ej2-filemanager-ibm-cos-node-file-provider

```

- To install the depend packages for the file provider, navigate to @syncfusion/ej2-filemanager-ibm-cos-node-file-provider folder within the node_modules and run the following command

```sh

  npm install

```

- Now, run the following command line to check the Node API service in local and it will start in `http://localhost:8090/`.

### To configure the port

- To configure the port, use like this `set PORT=3000`.

For example:

```sh
set PORT=3000 && node index.js
```

### Start the service

To start the service use this command.

```sh
npm start
```

## File Manager AjaxSettings

To access the basic actions such as Read, Delete, Copy, Move, Rename, Search, and Get Details of File Manager using IBM Cloud Object Storage file service, map the following code snippet in the AjaxSettings property of File Manager.

Here, the `hostUrl` will be your locally hosted port number.

```
  var hostUrl = http://localhost:8090/;
        ajaxSettings: {
            url: hostUrl,
        }
```

## File download AjaxSettings

To perform download operation, initialize the `downloadUrl` property in AjaxSettings of the File Manager component.

```
  var hostUrl = http://localhost:8090/;
  ajaxSettings: {
            url: hostUrl,
            downloadUrl: hostUrl + 'Download'
        },
```

## File upload AjaxSettings

To perform upload operation, initialize the `uploadUrl` property in AjaxSettings of the File Manager component.

```
  var hostUrl = http://localhost:8090/;
  ajaxSettings: {
            url: hostUrl,
            uploadUrl: hostUrl + 'Upload'
        },
```

## File image preview AjaxSettings

To perform image preview support in the File Manager component, initialize the `getImageUrl` property in AjaxSettings of the File Manager component.

```
  var hostUrl = http://localhost:8090/;
  ajaxSettings: {
            url: hostUrl,
            getImageUrl: hostUrl + 'GetImage'
        },
```

The FileManager will be rendered as follows.

![File Manager](https://ej2.syncfusion.com/products/images/file-manager/readme.gif)

## Support

Product support is available through the following mediums:

- Create an incident in Syncfusion [Direct-trac](https://www.syncfusion.com/support/directtrac/incidents?utm_source=npm&utm_campaign=filemanager) support system or [Community forum](https://www.syncfusion.com/forums/essential-js2?utm_source=npm&utm_campaign=filemanager).
- Create a new [GitHub issue](https://github.com/syncfusion/ej2-javascript-ui-controls/issues/new).
- Ask your questions in [Stack Overflow](https://stackoverflow.com/?utm_source=npm&utm_campaign=filemanager) with tag `syncfusion` and `ej2`.

## License

Check the license details [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/license).

## Changelog

Check the changelog [here](https://github.com/syncfusion/ej2-javascript-ui-controls/blob/master/controls/filemanager/CHANGELOG.md)

© Copyright 2020 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution.

---
_Source: https://npm.io/package/@syncfusion/ej2-filemanager-ibm-cos-node-file-provider · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
