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
1
vote
2 answers

Convert a collectionFS file from filesystem to gridFS on serverside

In our meteor app, the client will upload some files using collectionFS-filesystem which i store it to an uploads folders in root directory of my app. //My CFS uploads collection uploads = new FS.Collection("uploads", { stores: [new…
Sudheer Jami
  • 697
  • 6
  • 15
1
vote
2 answers

Upload progress bar for small files in meteor CollectionFS

With the meteor-cfs-ui-package you can show a progress bar for uploading files. But this only works well für files, which are bigger then 2 MB. If the files are smaller, the bar just jumps from 0% to 100%. Here I found a solution for that, which…
user3142695
  • 15,844
  • 47
  • 176
  • 332
1
vote
0 answers

meteor.js - CollectionFS image categories

I’m trying to add an image collection with categories (e.g. Featured Image, Food, Floorplan). I’m using the below code to create an image collection: //create fs collection with gridfs to hold images Images = new FS.Collection('Images', { …
Sekoul
  • 1,361
  • 2
  • 14
  • 30
1
vote
0 answers

The provided value 'undefined' is not a valid enum value of type XMLHttpRequestResponseType

I am getting The provided value 'undefined' is not a valid enum value of type XMLHttpRequestResponseType. cfs_upload-http.js:109 when trying to upload a file using collectionfs. This does not affect the upload on the browser but seems to be…
Matthew Slaton
  • 349
  • 1
  • 4
  • 14
1
vote
1 answer

Same read- and write-stream in collectionFS using graphicsmagick

I need to manipulate an image using graphicsmagick. My FSCollection looks like this: Images = new FS.Collection("media", { stores: [ new FS.Store.FileSystem("anything"), new FS.Store.FileSystem("something") ], }); My problem…
user3848987
  • 1,627
  • 1
  • 14
  • 31
1
vote
1 answer

Set value in a loop to a value which is set in the first loop execution

What I want to do is to set a variable to a value which is set by the first loop execution. As background information: I'm using CollectionFS to upload multiple files in my meteor app. Now I want to set to all files (beside the first one) the custom…
user3142695
  • 15,844
  • 47
  • 176
  • 332
1
vote
1 answer

Return url from global template helper using CollectionFS

Im trying to get the url of an uploaded image using a global template helper. So far i tried doing isPrimary.url() but i only get null, otherwise isPrimary.url returns a function. Any idea how to deal with this? user_item.html
Andrés Da Viá
  • 586
  • 1
  • 8
  • 24
1
vote
2 answers

Read CollectionFS file from server's filesystem when hosted on meteor.com

Im trying let the user Upload a txt file and then let him click a button "analyze" and then perform some analysis. I have the app working locally, Im using FS.Collection and FileSystem however I had several problems deploying to meteor.com. Here is…
svelandiag
  • 4,231
  • 1
  • 36
  • 72
1
vote
1 answer

Display CollectionFS images in Angular

I'm having trouble retrieving stored images in GridFS (via CollectionFS) in my Angular controller. I subscribe to the meteor images: $scope.images = $meteor.collectionFS(Images, false, Images); then I upload them to the DB (which works)…
Alek Hurst
  • 4,527
  • 5
  • 19
  • 24
1
vote
0 answers

Meteor GridFS 403 forbidden

Possible duplicate: Meteor collectionfs insert server side I have multiple image collections using GridFS to store files. If I use "Images" as name for the collection everything works fine, but as soon as I change the name I'm getting GET…
1
vote
0 answers

Upload image using URL (CollectionFS package)

Have anyone tried to upload images with CollectionFS package but using URL (some image link from different domain) instead of input field. Would be grateful for any hints. There must be some way I see it like this: Insert link into field Fire…
Dmitry
  • 168
  • 2
  • 9
1
vote
0 answers

Download of previously stored document in Meteor fails

My meteor application does not download previously stored documents. Initially I thought I was having problems with ongoworks:security support for CollectionFS. RsrchDocs.files.permit(['download']).apply() causes Invalid key errors. Have read the…
dpneumo
  • 131
  • 1
  • 6
1
vote
1 answer

Meteor.js: How to perform action on download link of CollectionFS

Hello I have a template where I have link to download uploaded images: {{#each uploads}}
1
vote
0 answers

Creating Fixture for CollectionFS File

Is there a way to generate fixture for a CollectionFS File? Normally it would have to be uploaded through a browser, but I would like to generate fixtures from local files.
harinsa
  • 3,176
  • 5
  • 33
  • 53
1
vote
0 answers

Pulling images in from S3 bucket in Meteor

I saw a lot of docs on how to upload files to S3 but my question is kind of reversed. I have a meteor app and i set up collectionFS in it. Now I have an S3 bucket with header images for each document inside my app. How do i reference it for an…
416serg
  • 348
  • 2
  • 17
1 2 3
8 9