Save Image to mySQL and Retrieve Image?

Dave Cragg dcragg at
Tue Jun 9 02:27:04 EDT 2015

> On 8 Jun 2015, at 23:10, JOHN PATTEN <johnpatten at> wrote:
> Hi All,
> I have a a mobile app that takes a photo and POSTs the base64Encoded image to an .lc server script that saves it to a mySQL field.
> set the vis of templateImage to false
>   mobilePickPhoto "camera"
>   put the last image into img "imageHold"
>   put the text of image "imageHold" into tPhotoData
>   put base64Encode(tPhotoData) into tPhotoData
>   set the cImageData of img "ImageHold" to tPhotoData
>   reset the templateImage
>   put urlEncode(cd fld "comments") into $Comments
>  put the cImageData of img "imageHold" into tImage
>  put "comments=" & $Comments & "&image=" & tImage into tArgList
>  post tArgList to URL "”

Shouldn’t you urlEncode the base64 string? It can contain characters such as '+', '/', and '='.


More information about the Use-livecode mailing list