Page 1 of 9
Camera to Database.
Posted: Wed May 15, 2013 12:49 pm
by DanGarrett
If someone can explain simply (Like a tutorial), how to get a photo from the camera to the appery database ready for use, it would be very appreciated.
I've tried piecing together bits and pieces from the other tutorials about using the camera and file upload, but it's not going well.
Thanks!
Camera to Database.
Posted: Wed May 15, 2013 2:14 pm
by Kateryna Grynko
Hi Dan,
We're working on it. Will update soon.
Camera to Database.
Posted: Wed May 15, 2013 3:43 pm
by Anton Artyukh5836028
Part 1.
1) Create new Database: PhotoDB
2) Add collection: photo
3) Add columns:
photo: String
Name: String
Part 2.
1) Create project
add Button -- with name takephoto
add Image -- photopreview
add Button -- savedb
add List -- photolist
- remove all items except one
add Label to the last list item --photoname_label
add Camera device service -- mobilecamera1
add database service for "PhotoDB" --
set service rights for Create (PhotoDB_photos_create_service) and List (PhotoDB_photos_list_service) items in collection "photo"
2) Create service camera_shot for CameraService
Map Response:
imageDataBase64 to Asset property "photopreview" component
imageDataBase64 to new localStorage variable "photo_buffer"
Now you can create photo and save it to localStorage.
3) Create create_service based on PhotoDB_photos_create_service:
Map Request:
photoname.Text to Name in Request
photo_buffer from localStorage to photo in Request
4) Create list_service based on PhotoDB_photos_list_service:
Map response
$ to photolist
Name to photoname_label.Text
5) Create Click Event for "savedb" -- invoke create_service and then invoke list_service
6) Create Load Event for startPage -- invoke list_service
Now you can test simple application that take shot, show preview and saves it to database.
Camera to Database.
Posted: Thu May 16, 2013 5:53 am
by DanGarrett
Worked perfectly, great support guys!
Camera to Database.
Posted: Wed May 22, 2013 5:52 pm
by Bikram Ray
Great tutorial it helps a lot.
Camera to Database.
Posted: Fri May 24, 2013 10:25 am
by Marcel
Excellent tutorial and solution.
So easy to upload the photos and attach an own reference no (e.g. order no) into your collection and then easy to download automatically into your ERP system if is the case.
Just simple query the collection and get your photos !!!!!
Was looking for this solution for a good couple of months.
10000000 points from me 
Regards,
Marcel
Camera to Database.
Posted: Wed May 29, 2013 3:34 am
by Sylan Sruleam
I cannot see and sub-tasks under localstorage???
and how can I set service rights for create and list?
Camera to Database.
Posted: Wed May 29, 2013 3:35 am
by Sylan Sruleam
Camera to Database.
Posted: Wed May 29, 2013 5:57 am
by Anton Artyukh5836028
Hi Sylan,
About sub-tasks.
Did you mean localStrorage variables?
About rights.
I hope screenshot may help.
Camera to Database.
Posted: Tue Jun 11, 2013 1:22 am
by Torrence Reed
Do you have version of this tutorial with screenshots? Some of the instructions are not to clear to me