Prowler,
function getBase64(test, callback) {
var newArray = [];
for (var i = 0; i < test.length; i++) {
var reader = new FileReader;
reader.onload = function() {
newArray.push(reader.result);
if (test.length == newArray.length) callback(newArray)
};
reader.onerror = function(error) {
console.log("Error: ", error)
};
reader.readAsDataURL(test[i])
}
};