Meteor how to create copy of file in CollectionFS?

48 Views Asked by At

I need to create copy one of record in my FS.Collection ...

I am able to fetch record by

var oldFile = Attachment.find({ _id : cardId });
var newFile = oldFile.copy();

Above code doesn't work for me

I have following packages installed in my Meteor project

aldeed:collection2
cfs:gridfs
cfs:standard-packages

But I am not able to use FS.File.copy method as it gives error of undefined function in my helper method of template. (running on client side)

0

There are 0 best solutions below