Closed yaronyg closed 8 years ago
How it might look -
That is cool! Although I was more excited when I thought you had already implemented it. Took me a second to realize it was a mock. :)
Cordova returns base64 encoded imageData which we can store as a PouchDB attachment - http://pouchdb.com/guides/attachments.html or as a Blob. Does anyone have a preference?
There is no Cordova API that will return a buffer? I suppose that makes sense as the Cordova bridge requires everything to be a string. Sigh.. oh well. From a "helping Thali" perspective it would be best if we stored it as an attachment. This would force us to finally exercise those APIs.
I have small images being saved as an attachment in PouchDB using base64. But having trouble with saving large images on PouchDB 413 (Request Entity Too Large)
app.use( bodyParser.urlencoded({ extended: true, limit: '10mb' }) );
iframe issues: So I want to call Cordova commands from web app client on the mobile but I reckon I need to do some additional wiring to get working it with JXCore / Express app running inside an iframe... Tried to get 'parent' of iframe to get access to Cordova functions but this failed due to different origins 'file://' and 'localhost://'.
OPTIONS :
parent.postMessage('data','*');
to trigger Cordova function in main window - "index.js" then post message back to iframe to trigger callback. https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
We need to take and store photos