Thanks for your reply - I downloaded your file but can't see any PHP files or details about how this solves my problem?
I have no issue with doing the encoding/decoding in FileMaker Pro - it's just not happening when I populate raw Base64encoded data into a field via the PHP API and have an auto-enter calc on a container field like this:
Base64Decode ( CustomerPhoto ; "photo.png" )
to generate the image. I haven't tried your file but there's nothing in there that I can see that would work differently from mine - have you tested this via PHP?
Sorry if my post wasn't clear about this.
I believe the problem is with FM base64encode it adds spaces after every 76 chars which is not normal. You will have to strip those spaces out or use a different method to encode.
There is a video on Lynda.com that talks about displaying container images in a webviewer. The author created a custom function to remove the spaces. Base64 Encoding and Decoding in FileMaker 13 If you are a member or Lynda.com then you can download sample code.
I just worked out what the issue is - the Base64 functions were introduced in FileMaker v13 and I've just been told the client is using FileMaker Server v12. As the record is being created server side via PHP it isn't able to decode the container image using the Base64Decode function as it doesn't exist!