vsivsi / meteor-file-collection

Extends Meteor Collections to handle file data using MongoDB gridFS.
http://atmospherejs.com/vsivsi/file-collection
Other
159 stars 37 forks source link

Any samples without upload/download functionality? #173

Closed LevanArabuli closed 6 years ago

LevanArabuli commented 6 years ago

Is there a sample which just stores and retrieves data from GridFS, no upload/download functionality?

vsivsi commented 6 years ago

So just for server-side use only? There aren’t any sample apps for that because that case is potentially so much simpler...

You are basically just restricting yourself to setting up the fileCollection object and using the last four server-side API methods starting here: https://github.com/vsivsi/meteor-file-collection#fcfindonestreamselector-options-callback

Each of those methods has example usage code snippets in the documentation linked above.

LevanArabuli commented 6 years ago

Sounds great, thanks!

vsivsi commented 6 years ago

I should mention that you can, and of course will, also use the normal Collection/MongoDB methods: find, findOne, update, remove, and you should look to the docs for how the semantics of those methods map to fileCollection.