Hey guys,
I have an app that uploads a CSV file, and put them in a collection.
However, I want the database to be emptied whenever a new CSV file is uploaded after a click event.
I am trying to call MyCollection.remove({});
but it is not letting me, comes back with a “Denied” in the console.
After doing some research, for security reasons, it appears that I can’t delete everything, but rather one by one using ._id
.
The suggestions online were all point towards Meteor.methods, but I am struggling with the syntax of it. Can you guys give me an example of how to do so? I’m merely a beginner and trying to learn. Thank you!