Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jalik/meteor-jalik-ufs-gridfs
GridFS store for UploadFS
https://github.com/jalik/meteor-jalik-ufs-gridfs
gridfs meteor
Last synced: 4 months ago
JSON representation
GridFS store for UploadFS
- Host: GitHub
- URL: https://github.com/jalik/meteor-jalik-ufs-gridfs
- Owner: jalik
- License: mit
- Created: 2015-07-29T19:31:29.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2022-04-02T09:46:47.000Z (almost 3 years ago)
- Last Synced: 2024-04-14T06:18:25.767Z (10 months ago)
- Topics: gridfs, meteor
- Language: JavaScript
- Size: 23.4 KB
- Stars: 14
- Watchers: 5
- Forks: 9
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UploadFS GridFS Store
A Mongo GridFS store for UploadFS.
## Installation
To install the package, execute this command in the root of your project :
```
meteor add jalik:ufs-gridfs
```If later you want to remove the package :
```
meteor remove jalik:ufs-gridfs
```## Creating a Store
**The code below is available on the client and the server.**
GridFS store files in a Mongo database by cutting them in chunks.
```js
import {Mongo} from 'meteor/mongo';
import {UploadFS} from 'meteor/jalik:ufs';
import {GridFSStore} from 'meteor/jalik:ufs-gridfs';// Declare store collection
const Photos = new Mongo.Collection('photos');// Declare store
const PhotoStore = new GridFSStore({
collection: Photos,
name: 'photos',
chunkSize: 1024 * 255
});
```## License
This package is released under the [MIT License](http://www.opensource.org/licenses/MIT).