-
-
Notifications
You must be signed in to change notification settings - Fork 169
remove
dr.dimitru edited this page Apr 8, 2016
·
9 revisions
Remove records from collection and files from FS.
-
selector
{Object} - See Mongo Selectors - Returns {Files} - Current Meteor.Files instance
var Images = new Meteor.Files({collectionName: 'Images'});
// Usage:
// Drop collection's data and remove all associated files from FS
Images.remove({});
// Remove particular file
Images.remove({_id: 'Rfy2HLutYK4XWkwhm'});
// Equals to above
Images.findOne({_id: 'Rfy2HLutYK4XWkwhm'}).remove();
// Direct Collection usage
// Remove record(s) from collection
Images.collection.remove({})
Meteor-Files | Support | Try ostr.io |
---|---|---|
If you found this package useful, — star it at GitHub and support our open source contributions with a monthly pledge, or submit a one-time donation via PayPal | Monitoring, Analytics, WebSec, Web-CRON and Pre-rendering for a website |