UNPKG

3.76 kBMarkdownView Raw
1# Unifile, unified access to cloud storage services.
2
3[![Build Status](https://travis-ci.org/silexlabs/unifile.png?branch=master)](https://travis-ci.org/silexlabs/unifile) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/0aa235e2fa2f457b9e3f2d608ec608e3)](https://www.codacy.com/app/jeanbaptiste-richardet/unifile?utm_source=github.com&utm_medium=referral&utm_content=silexlabs/unifile&utm_campaign=Badge_Grade) [![Known Vulnerabilities](https://snyk.io/test/github/silexlabs/unifile/badge.svg)](https://snyk.io/test/github/silexlabs/unifile) [![bitHound Overall Score](https://www.bithound.io/github/silexlabs/unifile/badges/score.svg)](https://www.bithound.io/github/silexlabs/unifile)
4
5Nodejs library to access cloud storage services with a common API.
6
7[![NPM](https://nodei.co/npm/unifile.png)](https://npmjs.org/package/unifile)
8
9Currently supported services
10
11* FTP
12* SFTP
13* Dropbox
14* GitHub: use git as a cloud with repository and branches as folder
15* [RemoteStorage](https://remotestorage.io/)
16* WebDAV
17* Local filesystem (might be useful to copy from your drive to your cloud)
18
19# Motivation
20
21With the rise of cloud services and the need to be independant of such or such provider, we decided to create a common tool to access a lot of online plateform.
22
23This aim to give the user of your app the liberty of choosing where they want to store their data.
24
25
26# Use
27
28Requirements
29
30* [Node.js](http://nodejs.org/) > 6.0.0
31
32# Use in your Node.js project
33
34Add unifile lib to your project
35
36```
37$ npm install unifile --save
38```
39
40## Vanilla Node.js
41
42Unifile use an API similar to the native `fs` module but with Bluebird Promises instead of callbacks.
43
44You can find the whole API documentation on the [project page](https://silexlabs.github.io/unifile/).
45
46## With Express
47
48Then write a small Node.js server [like this one](./samples/simple-api-server.js). Or play with the sample:
49
50```
51$ cd samples
52$ npm install
53$ node simple-api-server.js
54```
55
56Then open `http://localhost:6805/` and play with your cloud storages.
57
58## CloudExplorer
59
60You could also take a look at the UI called [CloudExplorer](https://github.com/lexoyo/CloudExplorer2): here's a [live demo](https://cloud-explorer2.herokuapp.com/).
61
62# Privacy
63
64Most of the service in Unifile uses [OAuth 2](http://wiki.oauth.net/w/page/25236487/OAuth%202) to connect the user into the service. This means Unifile doesn't have the user credential at any time.
65
66For the server that doesn't support OAuth, like FTP, the credentials are never stored.
67
68In all case, Unifile never uses any data of the user.
69
70# License
71
72[license: MIT](./LICENSE)
73
74# Developer guide
75
76## Add a service
77
78Unifile works with plugins to connect with more and more services. To find all the plugins available, you can follow the [unifile tag](https://github.com/topics/unifile) on GitHub. Or you can browse this non-exhaustive list:
79* [Unifile WebDAV](https://github.com/silexlabs/unifile-webdav)
80
81
82Unifile is built on modularity, meaning you can create a connector to a service a plug it in Unifile withouth modifying Unifile. So feel free to add any services you need! Don't forget to let us know about it so we could tell everyone :wink:
83
84Here is a list of services which could be useful
85
86* Google Drive
87* Amazon S3
88* CozyCloud, BTSync
89* SkyDrive, RapidShare, CloudMine, FilesAnywhere
90* SugarSync
91* Facebook (if possibe?)
92* a random list of other cloud storage services: Amazon Cloud Drive, Bitcasa, Box, DollyDrive, iCloud Drive, Microsoft OneDrive, SpiderOak, SugarSync, Wuala
93
94## Roadmap
95
96**Let's discuss [this list of issues which set the future of unifile](https://github.com/silexlabs/unifile/labels/enhancement)**
97