Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vsivsi/meteor-cfs-filesystem

Filesystem storage adapter for CollectionFS
https://github.com/vsivsi/meteor-cfs-filesystem

Last synced: 19 days ago
JSON representation

Filesystem storage adapter for CollectionFS

Awesome Lists containing this project

README

        

cfs-filesystem
=========================

NOTE: This package is under active development right now (2014-2-20). It has
bugs and the API may continue to change. Please help test it and fix bugs,
but don't use in production yet.

A Meteor package that adds local server filesystem storage for
[CollectionFS](https://github.com/CollectionFS/Meteor-CollectionFS). When you
use this storage adapter, file data is stored in a directory of your choosing
on the same server on which your Meteor app is running.

## Installation

Install using Meteorite. When in a Meteor app directory, enter:

```
$ mrt add cfs-filesystem
```

## Usage

```js
var imageStore = new FS.Store.FileSystem("images", {
path: "~/app-files/images", //optional, default '~/cfs/files/name'
beforeSave: myBeforeSaveFunction, //optional
maxTries: 1 //optional, default 5
});

Images = new FS.Collection("images", {
stores: [imageStore]
});
```

Refer to the [CollectionFS](https://github.com/CollectionFS/Meteor-CollectionFS)
package documentation for more information.

## Notes

A FileSystem store theoretically supports the `sync` option, but this feature
is not yet working correctly.