-
-
Notifications
You must be signed in to change notification settings - Fork 77
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
No id returned by insert callback #48
Comments
._id has been a problem with groundDB so far. See #27 I work around it by including _id in the object passed to Collection.insert() using collection2 and including an autovalue for _id using Random.id() |
Thanks @scottburch, that workaround did the trick for me. For others, to make it work with CFS, you need to upload a Template.test.events
'change input' : (e) ->
file = new FS.File e.currentTarget.files[0]
file._id = Random.id()
uploadedFile = col.insert file
console.log 'uploaded', uploadedFile._id # zt7JbYQjWwKNqtFEu |
Thanks guys! |
This is still an odd issue, I'm trying to track down the true issue... Its not consistent, and the workaround should not be necessary.. I can replicate the issue in my qa test clients - but if I open the console and do Also I can replicate this issue using a regular Meteor.Collection... In fact at the moment grounddb is using plain Meteor.Collection for this - So somethings weird is going on... What I can see is that the Meteor.Collection.insert is not adding an |
Looks like simply using
meteor add ground:db
will break CollectionFS file uploads, at least with GridFS.After adding ground:db, whenever I upload files, the file object has an
_id
ofundefined
. Removing ground:db fixes this.Without ground:db
With ground:db
The text was updated successfully, but these errors were encountered: