pouch error while getting document
Hi,
In my project, I am opening camera and storing clicked image in pouch and couchDB . It is storing huge base64 string in database for single image and while retrieving that attachment I am facing error as {"status":404,"name":"not_found","message":"missing","reason":"missing"}. Sometime this works smoothly but most of the times this issue comes.
I am storing image in pouch as follows:
this.db
.putAttachment(fileId, fileName, fileDetail, fileType)
.then(function(result) {
console.log("result for file putting in pouch", result);
})
.catch(err =>
console.log("error on saving file with updated attachment", err)
);
where fileDetail is blob . and fetching the document as
try {
let fileData = this.db.get(this.fileId.toString(), { attachments: true });
console.log("FILE DATA ", fileData);
} catch (err) {
console.log("err on getting base64: " + err);
}
I am using following versions : npm : 5.6.0 node : 8.9.3 pouchdb: "^6.4.1", pouchdb-adapter-cordova-sqlite: "^2.0.2", pouchdb-adapter-websql-core: "6.4.1", @ionic-native/camera: "^3.9.2", cordova-plugin-camera: "^2.4.1", Environment: Node => 8.9.3 , Ionic =>3.19.0 Platform: Android
Kindly help.