March 27, 201510 yr Just wondering if anyone has a quick answer to this... I've been going round in circles trying to get it to work... Firstly, I would like to use FileMaker Pro 13's base64encode function to encode a file in a container field, and then use httppost to send the encoded text to a php script on my web server which then does a base64_decode to then save the file (PDF, images etc) on the web server. However, php's base64_decode doesn't seem to work with the base64 encoded text that FileMaker has generated. The resulting file is saved, but cannot be opened/recognised..... Further to this, I also need to be able to do the same in a FileMaker Pro 12 version, using the Base Elements Plugin functions to also do a base64 encode and an http POST.... Any ideas anyone..? Many thanks, Sky.
March 27, 201510 yr Author Aha - I think I found the answer... In the php script on my web server I added the following line: $data = str_replace(" ","+",$_POST['data']); so it is now: $data = str_replace(" ","+",$_POST['data']); $data = base64_decode($data); file_put_contents('test.png', $data); ..where $_POST['data'] is the base64 encoded text generated by FileMaker 13, and also the Base elements plugin....
Create an account or sign in to comment