Skip to content

jalik/meteor-jalik-ufs-gridfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

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.

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy