tomitrescak/meteor-uploads

controlling download access to uploaded files.

Open

#125 opened on Jul 31, 2015

View on GitHub
 (10 comments) (0 reactions) (0 assignees)HTML (295 stars) (41 forks)batch import
enhancementhelp wanted

Description

I am loving this uploader tool so far, but I've come to a snag, which was discussed on issue 58: #58

I have previously tried doing file uploads with CollectionFS, but was looking for something better. Specifically I liked the idea that I could choose my own collection in which to store my file metadata, which didn't seem to be possible with the CollectionFS way of doing uploads.

So I put together a demo (https://github.com/wesyah234/fileUploadDemo2) using this package, and soon came to realize that controlling access to the uploaded files did not seem to be possible, at least in the easy way it was with CollectionFS. See https://github.com/CollectionFS/Meteor-CollectionFS#security for how they are doing it, via allow/deny rules.

I was able to prevent a view of a file depending on whether the user was logged in, because it hooked into the Meteor.Accounts system.

The solution in issue #58 does not seem like it will tie into the Meteor.accounts system or anything like that. Are there any other ideas for this issue?

In my work with Java and PHP, typically you would stream the document through PHP or Java, and before streaming it through, you would get to check certain permissions. Is there a possible solution like that here with Meteor? IE. stream it through a route in Meteor?

Contributor guide