A file storage system for RethinkDB inspired by GridFS
Last updated 3 years ago by internalfx .
ISC · Repository · Bugs · Original npm · Tarball
$ cnpm install rethinkdbfs 
SYNC missed versions from official npm registry.


A file storage system for RethinkDB inspired by GridFS

The RethinkDBFS spec is being discussed on the RethinkDB slack channel. There WILL be breaking changes.

npm version license

Special thanks to Arthur Andrew Medical for sponsoring this project.

Arthur Andrew Medical manufactures products with ingredients that have extensive clinical research for safety and efficacy. We specialize in Enzymes, Probiotics and Antioxidants.


Supports node v4.0+

npm install rethinkdbfs

Getting Started

var RethinkDBFS = require('rethinkdbfs')

var dbfs = RethinkDBFS({db: 'example'})

// prepDB creates tables and indexes if they don't exist, returns a promise.
dbfs.prepDB().then(function () {
  // We are now ready to read and write files

  // create read stream from file
  var fileStream = fs.createReadStream('./bigvid.mp4')

  // Pipe it to a RethinkDBFS write stream
  fileStream.pipe(dbfs.writeFile({filename: '/videos/bigvid.mp4'}))

  fileStream.on('end', function () {
    // File is now written to the database

    //Read the file and pipe it to a write stream to save the file back out to the file system.
    dbfs.readFile({filename: '/videos/bigvid.mp4'}).pipe(fs.createWriteStream('./test-bigvid.mp4'))


Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 3
Dependencies (4)
Dev Dependencies (0)
Dependents (0)

Copyright 2014 - 2016 © |