I'm working on a meteor project and one of its functionality is for users to upload their pictures in their profile. I wanted to create a new folder in the public directory (i.e public/img/user_id/files_to_upload_here.jpg), every time a new user is created.
Accounts.onCreateUser(function(options, user) {
//code to create a folder
});
How can I achieve that?
Thanks!
This is not the way to go. Use a filesystem like CollectionFS instead:
https://github.com/CollectionFS/Meteor-CollectionFS