Can't pass File object to a Meteor method


#1

I noticed if I have a File object (created from initiating a file upload), if I pass the file object as an argument to a Meteor method, the method sees it as undefined for some reason. Is there a way to pass this to a method so that a package such as edgee:slingshot can use it properly?


#2

I believe all arguments to methods need to be EJSONable. Perhaps that’s the issue?


#3

That very well may be the case. So I may just have to find another way to accomplish what I’m trying to do.


#4

I found this out when trying to pass a method a mongo document that had a transform on it to provide some utility methods. All the functions got stripped but the data was still there. Took a while to work it out! :confused:


#5

Take this as example https://github.com/andrejsm/poac-meteor-local-file-upload