Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

unifile

silexlabs294MIT2.0.24

Library to provide a unified API, mirroring Fs, for cloud storage services.

cloud, dropbox, github, storage, webdav, remotestorage, ftp, sftp

readme

Unifile, unified access to cloud storage services.

Nodejs library to access cloud storage services with a common API.

NPM

Currently supported services

  • FTP
  • SFTP
  • Dropbox
  • GitHub: use git as a cloud with repository and branches as folder
  • RemoteStorage
  • WebDAV
  • Local filesystem (might be useful to copy from your drive to your cloud)

Motivation

With 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.

This aim to give the user of your app the liberty of choosing where they want to store their data.

Use

Requirements

Use in your Node.js project

Add unifile lib to your project

$ npm install unifile --save

Vanilla Node.js

Unifile use an API similar to the native fs module but with Bluebird Promises instead of callbacks.

You can find the whole API documentation on the project page.

With Express

Then write a small Node.js server like this one. Or play with the sample:

$ cd samples
$ npm install
$ node simple-api-server.js

Then open http://localhost:6805/ and play with your cloud storages.

CloudExplorer

You could also take a look at the UI called CloudExplorer: here's a live demo.

Privacy

Most of the service in Unifile uses OAuth 2 to connect the user into the service. This means Unifile doesn't have the user credential at any time.

For the server that doesn't support OAuth, like FTP, the credentials are never stored.

In all case, Unifile never uses any data of the user.

License

license: MIT

Developer guide

Add a service

Unifile works with plugins to connect with more and more services. To find all the plugins available, you can follow the unifile tag on GitHub. Or you can browse this non-exhaustive list:

Unifile 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:

Here is a list of services which could be useful

  • Google Drive
  • Amazon S3
  • CozyCloud, BTSync
  • SkyDrive, RapidShare, CloudMine, FilesAnywhere
  • SugarSync
  • Facebook (if possibe?)
  • a random list of other cloud storage services: Amazon Cloud Drive, Bitcasa, Box, DollyDrive, iCloud Drive, Microsoft OneDrive, SpiderOak, SugarSync, Wuala

Roadmap

Let's discuss this list of issues which set the future of unifile

changelog

Change log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[] - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

[2.0.8] - 2019-11-06 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Fixed

  • [FTP] FTP client has been replace, thus fixing multiple bugs like stat
  • [SFTP] Fix an issue when listing or stating with an empty path
  • [GitHub] Gracefully handle scopes and permissions
  • [Node] Update minimal version of Node to 8

[2.0.4] - 2018-10-08 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Fixed

  • [FTP] Handles FTP server that return an empty list on 404 (like OVH)

[2.0.3] - 2018-03-25 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Fixed

[2.0.2] - 2018-03-10 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Fixed

[2.0.1] - 2017-12-11 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Fixed

[2.0.0] - 2017-11-25 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Changed

  • GitHub batch fixes and optimization
  • Code factorization
  • Remove parameters mutations
  • .readFile() now always return a Buffer
  • [Dropbox] Retrieve account when providing only the token
  • [Dropbox] Normalize errors (https://github.com/silexlabs/unifile/issues/103)

Added

  • Tools, index and FS are 100% covered
  • Coverage for all connectors
  • [Dropbox] Add some security check

Fixed

Removed

  • WebDAV connector is now a separate plugin
  • unifile.connectors is now private

[1.2.0] - 2017-06-01 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Added

  • SFTP support
  • .stat() method that return information abouth the given path
  • Connector constructor now accepts infos to override static infos
  • FS connector now has a sandbox to restrict file access

Fixed

  • .getInfos() now correctly get the session
  • Takes GitHub redirectUri into account for OAuth requests
  • Fixes Dropbox batch operation
  • Fixes Dropbox infos when account has not been set yet

Changed

  • Dropbox is now more tolerant with the path (first / is optional)
    • Includes connector documentation to the global one
    • Includes README in documentation

[1.1.0] - 2017-04-26 - 2020-10-22 - 2020-10-25 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-10-28 - 2020-11-08 - 2021-01-08 - 2021-01-11 - 2021-01-20 - 2021-01-20

Added

  • Local filesystem support

1.0.0 - 2017-04-05

Changed

  • Total rework of the philosphy

[]: https://github.com/silexlabs/unifile/compare/v2.0.8...v [2.0.8]: https://github.com/silexlabs/unifile/compare/v2.0.4...v2.0.8 [2.0.4]: https://github.com/silexlabs/unifile/compare/v2.0.3...v2.0.4 [2.0.3]: https://github.com/silexlabs/unifile/compare/v2.0.2...v2.0.3 [2.0.2]: https://github.com/silexlabs/unifile/compare/v2.0.1...v2.0.2 [2.0.1]: https://github.com/silexlabs/unifile/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/silexlabs/unifile/compare/v1.2.0...v2.0.0 [1.2.0]: https://github.com/silexlabs/unifile/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/silexlabs/unifile/compare/v1.0.0...v1.1.0