Al works but how to store the caputred base64 image as a normal pjg image in a database.
the problem is convert the base64 data
discription servoy
Finally capture an image using capture. This will capture a shot and if successful data will be returned to the getBase64Data handler.
part off the captiured base64 image
data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCAG4AoADAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL
function callback(data) {
image = data;
var fs_cat = datasources.db.example_data.categories.getFoundSet();
fs_cat.newRecord();
fs_cat.picture = image;
databaseManager.saveData()
}
result
ERROR com.servoy.j2db.util.Debug - Kan data:image/jpeg;base64,/9j/4AAQSkZ…7tau2jP/9k= niet naar media data converteren
at /Users/wim/Documents/TestServoy8_3/ServoyWorkSpace/webCamExample/forms/webcamExample.js:89 (callback)
ERROR com.servoy.j2db.util.Debug - Setting dataprovider with name ‘picture’, type ‘MEDIA’ with value of wrong type ‘data:image/jpeg;base64,/9j/4AAQS…7tau2jP/9k=’ (Form Context: webcamExample)
at /Users/wim/Documents/TestServoy8_3/ServoyWorkSpace/webCamExample/forms/webcamExample.js:89 (callback)