Meteor-slingshot vs Meteor-CollectionFS. Which is better?


#1

also how do you display the images when using slingshot.


#2

I have not used either, but one piece of information that would be helpful to others who have more experience with file storage would be… Where do you want to store your files? AWS, S3, GridFS, ect.


#3

amazon S3 both work with it


#4

I use slingshot when I do some raw files uploads and collectionFS when I need to resize or apply filters on images before uploads. Both are solid choices.


#5

From my understanding, slingshot bypasses the meteor server and pushes to s3 from the client. So if you don’t need SS processing, that could be a good performance choice. Although I heard somewhere that CollectionFS is going to provide that option too?


#6

Slingshot returns the resulting URL in the callback.

uploader.send(document.getElementById('input').files[0], function (error, downloadUrl) {
  // do something with downloadUrl, like store it in a collection
  Images.insert({url: downloadUrl});
});

then you can have a template that iterates over your collection and displays the images you have uploaded

<template name="images">
 {{#each Images}}
  <img src="{{url}}">
 {{/each}}
</template>

#7

pull through imgix or cloudinary