Jhon Doe Posted October 11, 2018 Posted October 11, 2018 Hi everyone i'm new in filemaker, i'm using filemaker 17 and currently i'm involve in a proyect but i have a problem that i can't resolve, maybe someone of you have had the same problem. I'm saving images in base64 format in a database to show them in a layout with web viewer,that doesn't has any problem, the problem is that i'm using a portal and i didn't know that portals don't support web viewer. I have to display those images but i can't remove the portal since i didn't do that layout and it has scripts using it along with the portal, is there a way to show images saved in base64 without use web viewer? (I've already tried to use container field but it only show a "?" image 😓 ) My English is not the best but I tried my best ,Thanks for your help
comment Posted October 11, 2018 Posted October 11, 2018 1 hour ago, Jhon Doe said: I've already tried to use container field What exactly have you tried? A calculated container using the Base64Decode() function should work.
Jhon Doe Posted October 11, 2018 Author Posted October 11, 2018 Hi, I tried that code Base64Decode($(ImageInBase64),"name.png"), but since the $(ImageInBase64) is an image in base64 the container only shows me a "?" image.
comment Posted October 11, 2018 Posted October 11, 2018 I am afraid I don't understand your explanation. You should have a text field containing base64 encoded image data. Then a calculation field (result is Container) = Base64Decode ( YourTextField ; "name.png" ) should display the reconstructed image (assuming it was a .png image originally).
Jhon Doe Posted October 11, 2018 Author Posted October 11, 2018 sorry for my explanation, yes you right i've done that, but I want to show the image itself, and with this code, the container shows me a png icon and not the content of the text field containing base64 encoded image data. I don't know whether I 'm doing something wrong when I pass the data to that command or my data in base64 is bad encoded or damaged. Base64Decode ( YourTextField ; "name.png" ) Thank you for your help, I've figured out a way to resolve this problem, I've save the images that i need to show directly in the container field without use the text encoded in base64.
comment Posted October 11, 2018 Posted October 11, 2018 7 minutes ago, Jhon Doe said: I don't know whether I 'm doing something wrong when I pass the data to that command or my data in base64 is bad encoded or damaged. I don't know that either. But it does work for me, so you can paste your data into the attached file and see what you get. Base64Decode.fmp12 1
Jhon Doe Posted October 11, 2018 Author Posted October 11, 2018 (edited) Thank you once again, I've seen what was my mistake, you have to remove the line : data:image/png;base64 !!!! Edited October 11, 2018 by Jhon Doe
Jhon Doe Posted October 11, 2018 Author Posted October 11, 2018 (edited) 4 minutes ago, comment said: I am not aware of any such restriction, and I doubt it exists. A text field can contain up to 10 million characters - and the specs say nothing about any limits when processing it (except, of course, available memory). yes, I was on mistake that was the first thing I thought because i didn't realize what the error was. Edited October 11, 2018 by Jhon Doe
Recommended Posts
This topic is 2486 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now