So when i go and edit in the customer, i choose the picture but..
this code i use to get the photo.
Code: Select all
on mouseUp
set the lockloc of the templateimage to true
set the width of the templateimage to "140"
set the height of the templateimage to "195"
set the left of the templateimage to "410"
set the top of the templateimage to "664"
mobilePickPhoto "album"
if the result is text then
put the result into tData
--put the text of last image into tData
put base64encode("tData") into Tbase
put Tbase into fld "customer_photo"
end if
end mouseUp
the above is for ios..
the field in the sqlite is simple text NO blob
where i do wrong here?
the working code i use in mac environment is this bellow
Code: Select all
on mouseUp
-->>
local tChosenFile
answer file "Please choose the folder"
if there is a file tChosenFile then
put it into tChosenFile
put URL ("binfile:" & tChosenFile) into image "imagetest"
put base64encode(url("binfile:" & tChosenFile)) into tBase64ImgData
put tBase64ImgData into fld "customer_photo"