I am trying to get images (4 max) from the users’ computer and then convert them to raw binary content. I’m going to use the raw binary content to send to an API. I’m thinking of using Dropzone JS for the image upload (http://www.dropzonejs.com/) but I’m unsure how to manipulate the images after the user selects them without storing them directly to a collection.
I’m open to any other method of image upload as well.
The argument to the onDrop function is an array of the files uploaded. Is the data you need in there?
It sounds like you are trying to not store the files at all but in case I’m mistaken I am doing my file processing using amazon lambda scripts (with Dropzone and Slingshot to upload the files to an s3 bucket).
I tried that out and it did not work since Buffer is defined on the server and when I sent the file to the server to convert it to base64, it just did not work. I did come to a solution though. I changed the way my application accepts files now, through this method: http://www.jasny.net/bootstrap/javascript/#fileinput
Then I was able to access the file through Javascript using $('.fileinput').fileinput(); and that object has the base64 string in it. I used that for my API call and it worked perfectly.
Hi @simrank where did you see the base64 in the object of $(’.fileinput’).fileinput();? How did you access it? Can you pass that straight to a meteor call?