Closed javascriptlove closed 6 years ago
Hi, I'm pretty sure that's how it already works.
The implementations of fc.insert()
on both client and server call a function share.insert_func()
that contains code to handle the case you describe:
https://github.com/vsivsi/meteor-file-collection/blob/master/src/gridFS.coffee#L13-L16
If you are having problems getting that to work as expected, please point me to some code that reproduces the issue and I'll look into it.
Closing, no further action required.
Hi, this is rather a question than an issue. But it would solve some troubles on my end, what i'm interested in is this line https://github.com/vsivsi/meteor-file-collection/blob/master/src/gridFS_server.coffee#L99
Can we have a Match.Where here and check if _id is already a valid Mongo.ObjectId and only create a new id if it isn't? Something like in this pull?
(Please correct the code if there's a need, i'm not used to coffeescript)