You might want to use the Cordova sqlite datastore. Link
To do this,
Install the plugin in the folder with the ion project via:
cordova plugin add https:
Get ng-cordova.min.js and add ur to the javascript directory, add the following line of code to your index.html.
<script src="<your folder>/ng-cordova.min.js"></script>
Paste angular (app.js) into your module via:
angular.module('starter', ['ionic', 'ngCordova'])
Create a database through:
.controller('YourController', function(....., $cordovaSQLite){
var db = $cordovaSQLite.openDB("database.db");
$cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS form (id integer primary key, name text, address text, telephone text)");
Insert example:
$scope.insert = function(name, text, telephone) {
var query = "INSERT INTO form (name, text, telephone) VALUES (?,?,?)";
$cordovaSQLite.execute(db, query, [name, text, telephone]).then(function(res) {
console.log("success!");
}, function (err) {
console.error(err);
});
}
Then your image file can be stored as blob and have fun! (