Hi Marina,
thanks for your reply.
I followed this simple example (http://help.gotiggr.com/documentation...) to get the image directly from the camera component. Works great. However, what are the next steps? I tryed to map the "imageDataBase64" response from camera service to a local storage variable.
I also added a second button for the upload-service. The upload service has one request parameter (the local storage variable). The upload-service is configured with url (a php-script), method = post, datatype = json, content-type = json.
The php-script on the server-side looks like this:
precode
<?php
define('UPLOAD_DIR', 'upload/');
$img = $_POST['fileselect'];
$img = str_replace('data:image/png;base64,', '', $img);
$img = str_replace(' ', '+', $img);
$data = base64_decode($img);
$file = UPLOAD_DIR . uniqid() . '.png';
$success = file_put_contents($file, $data);
print $success ? $file : 'Unable to save the file.';
?>
/code/pre
Thanks
Florian