I convert kml file to base 64. Now I want to encode base 64 to become kml file again? is this possible? I convert kml file like this..
$scope.myFunction = function () {
var files = document.getElementById('myFile').files;
if (files.length > 0) {
getBase64(files[0]);
}
}
function getBase64(file) {
var reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = function () {
console.log(reader.result);
};
reader.onerror = function (error) {
console.log('Error: ', error);
};
}
how can I store kml file to database?