Questions tagged [collectionfs]

CollectionFS is a suite of Meteor packages that together provide a complete file management solution including uploading, downloading, storage, synchronization, manipulation, and copying. It supports several storage adapters for saving to the local filesystem, GridFS, or S3, and additional storage adapters can be created.

CollectionFS is a suite of Meteor packages that together provide a complete file management solution including uploading, downloading, storage, synchronization, manipulation, and copying. It supports several storage adapters for saving to the local filesystem, GridFS, or S3, and additional storage adapters can be created.


The CollectionFS package makes available two important global variables: FS.File and FS.Collection.

  • An FS.File instance wraps a file and its data on the client or server. It is similar to the browser File object (and can be created from a File object), but it has additional properties and methods. Many of its methods are reactive when the instance is returned by a call to find or findOne.
  • An FS.Collection provides a collection in which information about files can be stored. It is backed by an underlying normal Mongo.Collection instance. Most collection methods, such as find and insert are available on the FS.Collection instance. If you need to call other collection methods such as _ensureIndex, you can call them directly on the underlying Mongo.Collection instance available through myFSCollection.files.

A document from a FS.Collection is represented as a FS.File.

CollectionFS also provides an HTTP upload package that has the necessary mechanisms to upload files, track upload progress reactively, and pause and resume uploads.

Read more in the documentation.

130 questions
2
votes
1 answer

Access existing MongoDB collection from meteor app

In my MongoDB, I have a collection that I created and populated from the server side, called "fs.files" (It's a gridFS collection). In my meteor app, is there a way to declare a global variable that simply can fetch me information from this…
Jenna Kwon
  • 1,212
  • 1
  • 12
  • 22
2
votes
0 answers

Meteor + CFS + DigitalOcean bug

I am not sure what happened because everything was working fine but now there is a weird bug on my app. I had an app hosted on Modulus at www.raiseyourflag.com I then created a version of it in React and Moved it to DigitalOcean at…
416serg
  • 348
  • 2
  • 17
2
votes
1 answer

Migrating from cfs:gridfs to cfs:s3

In a meteor project I maintain there has been cause to look at moving away from gridfs as the backend to CollectionFS and moving towards s3. One thing I would be keen to do is migrate images / files currently stored using the gridfs collections. Has…
Toby
  • 8,483
  • 13
  • 45
  • 68
2
votes
1 answer

CollectionFS/Meteor-CollectionFS uploading files of 0 bytes

I am trying to upload files to a dropbox app. Using the package CollectionFS/Meteor-CollectionFS with the cfs:dropbox adapter and my problem is that the files being uploaded is 0 bytes. I am not sure what I am missing or doing wrong here. On…
Gravity123
  • 1,130
  • 3
  • 21
  • 39
2
votes
1 answer

Upload and read/write files in meteor

I'm trying to upload and read a file on the fly in meteor. However I didn't find any packages/tutorials to do this so I tried to use the FS library but I have some troubles with it. I have a in my template, and an event like this : "change…
TLR
  • 577
  • 3
  • 8
  • 24
2
votes
3 answers

How to save to /public in Meteor with cfs:filesystem and collectionfs?

/lib/collections/images.js var imageStore = new FS.Store.FileSystem("images", { // what should the path be if I want to save to /public/assets? // this does not work path: "/assets/images/", maxTries: 1 }); Images = new…
fuzzybabybunny
  • 5,146
  • 6
  • 32
  • 58
2
votes
2 answers

Displaying FS.File references from objects in Meteor.js

I'm using CollectionFS to allow image uploads. The image uploads need to belong to specific posts. I followed the steps from the documentation - Storing FS.File references in your objects - however, I'm having a hard time displaying the image of the…
JeremyE
  • 1,368
  • 4
  • 20
  • 40
2
votes
0 answers

How to create thumbnails of videos with Meteor, CollectionFS, & FFMPEG

I'm using Meteor with CollectionFS to store videos. I need a transform to create thumbnails of my videos. Videos = new FS.Collection("videos", { stores: [ new FS.Store.FileSystem("thumbs", { transformWrite: function(fileObj,…
Jared Martin
  • 653
  • 7
  • 20
2
votes
0 answers

Insert image in my own collection using Meteor CollectionFS:filesystem

I am using Meteor CollectionFS Package(cfs:filesystem) to upload image. I have used this syntax: Images = new FS.Collection("images", { stores: [imageStore] }); but it stores image in new collection that is 'cfs.images.filerecord' instead of this…
Hitesh S
  • 460
  • 1
  • 5
  • 20
2
votes
1 answer

How to upload Image using Meteror CollectionFS to server Folder

i'm new to meteor. And i found that there are lost of option available for image storing. And finally i decided to use this package CollectionFS. But in this package it stores file in collection. I do not want to store image in collection , i just…
Hitesh S
  • 460
  • 1
  • 5
  • 20
2
votes
1 answer

Meteor's CollectionFS download Error: write after end

This issue appears only on production stage, development stage - works like a charm. When user tries to download the file by link generated via helper: Download On server side node.js is fails and forever…
dr.dimitru
  • 2,645
  • 1
  • 27
  • 36
1
vote
0 answers

Meteor GridFS, CollectionFS - Download URLs for Files on Meteor 2.11 / Mongo 6 result in 503 Service Unavailable

After updating Meteor from 2.10 to 2.11 which includes Mongo 6 The download URLs from Files stored in the GridFS returning 503 - Service Unavailable URL is still the same. Packages in…
Gobliins
  • 3,848
  • 16
  • 67
  • 122
1
vote
1 answer

Multiple FS Collection Meteor

I'm currently using Meteor collectionFS, to be able to upload images, the project works correctly, but it only works if I want to upload and see a single image. What I want is to select 2 or more images and to visualize correctly, in the input I am…
sheila.ar
  • 57
  • 6
1
vote
0 answers

Meteor + React + CollectionFS + GridFs + DropZone: importing server side

All seems go well until i include the Images Collections in server side. After that meteor doesn't start. commons.js export const Images = new FS.Collection("images", { stores: [new FS.Store.GridFS("images", {path:…
Reactib
  • 85
  • 3
  • 14
1
vote
1 answer

Is it good to save images in database with meteor?

I have images more than .5 millions and I am using meteor and angular for developing app. I have a doubt to save images on database because it could be slow the speed of project. 1-- where to store images in meteor angular app? 2-- I am using…
prashant yadav
  • 192
  • 2
  • 15
1
2
3
8 9