-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatibility with Apollo-server. #161
Comments
Hi, I don't know anything about ApolloServer. Currently file-collection only supports uploading to the Meteor server hosting the file-collection instance. The backing mongoDB can be anywhere. Built-in authorization is only currently handled using Meteor account tokens, but file-collection is very flexible about handling metadata and determining which Requests/URIs map successfully to a file. So you could almost certainly write code to use another authentication scheme such as whatever ApolloServer does. But file-collection is agnostic about that and won't do it "out-of-the-box" |
Ok I get it,
Is that it ? I'm sorry if I'm asking stupid questions but I have trouble navigation the source code due to the fact that I know nothing about coffee script. If I'm successful I'll happily try to glue together a starter kit :) |
So the main thing to know is that file-collection stores the file inside MongoDB using gridFS. That is the only place the files exist. The resumable.js upload chunks map 1:1 with gridFS chunks. If you need files on the server filesystem (not in the database) then file-collection probably isn't for you. Although you could rig together something to automatically export files back out of the DB, that is probably overly complicated. Unfortunately, I'm just about drop off of the internet for nearly a month, so I'm afraid I can't help you more now. |
I knew about that 😃 I want to keep all the GridFS and resumable goodness that's why I'm trying to find a workaround! I'll try to figure out how to upload to another server and mess around with the auth methods a bit. Have a nice vacation & thanks for this great library! |
Good luck! |
Hello,
I have a Graphql server (ApolloServer) separated from my main app.
I handle auth using this package : https://github.com/orionsoft/meteor-apollo-accounts
So my quick questions are :
How can I upload via myCollection.resumable.upload() to another server (the Apollo server) ?
Is it possible to get auth working with the package I mentioned ?
Thanks!
The text was updated successfully, but these errors were encountered: