Hi,
The customer is using LANSA Mobile.
They would like to take a photo, show it on image control on Web page,and save it to the sever.
I have succeeded in take a photo and show it on image control on the web page (Base 64 encoded).
#Image1.FileName := "data:image/png;base64," + #CameraUse.ImageAsBase64Data
However, I don't know how to save it to the server.
Is it possible to save it (BASE64 encoded = String type) to BLOB field on a file in the server?
If yes, could you please let me know how to?
Sorry for the basic question.
Thanks in advance.
Best Regards,
Megumi Sawada
How to save a photo to server which is newly taken on client
-
MegumiSawada
- Posts: 80
- Joined: Tue Mar 22, 2016 1:45 pm
- Location: Tokyo, Japan
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: How to save a photo to server which is newly taken on client
Hi Meg
As shown in xDemoWebImageCapture, the selected file needs to be stored in a blob field
The blob can then be sent to the server the same as any LANSA field. Once there, OV_FILE_SERVICE can be used to manipulate the location of the physical object. This thread provides a little more detail.
http://vlforum.lansa.com.au/viewtopic.p ... RVICE#p176
Regards
As shown in xDemoWebImageCapture, the selected file needs to be stored in a blob field
Code: Select all
Evtroutine Handling(#FilePicker.FileSelected) File(#File)
#Image.FileName #xDemoblob := #File.Blob
Endroutine
http://vlforum.lansa.com.au/viewtopic.p ... RVICE#p176
Regards
-
MegumiSawada
- Posts: 80
- Joined: Tue Mar 22, 2016 1:45 pm
- Location: Tokyo, Japan
Re: How to save a photo to server which is newly taken on client
Hi Stewart,
Thank you for your quick reply!
I have managed to save a photo as BLOB...!
Thanks again for your advice.
Best Regards,Megumi
Thank you for your quick reply!
I have managed to save a photo as BLOB...!
Thanks again for your advice.
Best Regards,Megumi