Jump to content
Sign in to follow this  
Jhon Doe

Display base64 images

Recommended Posts

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
 

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Thank you once again, I've seen what was my mistake, you have to remove the line : data:image/png;base64 !!!!

 

 

Edited by Jhon Doe

Share this post


Link to post
Share on other sites

 

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 by Jhon Doe

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Koonce
      I have an export script and it tries to save to server i need it to save to the local desktop cannot get scrip to work... I know Im doing wrong... need help thanks in advance.
       
    • By stuee
      Hi,
      I have a container which i click on and take a photo on my ipad and it shows in the container. I want to be able to click that image on the ipad or pc to view the image full size after. How can i do this?
    • By carlsson
      Today I updated FM Server from 17.02 to 17.05. After this update WebDirect refuses to start. 
      When I click on the slider, it says "Enabled",  but when I go back again it's Disabled.
      I have looked for Java updates, but I already have the latest update applied. 
       
      I'm on macOS 10.13.6 with all security patches applied.
      I haven't installed SSL yet, but it worked before this update so....
      Where should I look more?
       
      Please help! 😩


    • By Nuos
      Hey Folks
      Im running Server 17 and have a number of scripts configured to run. Recently, some have stopped executing.  What I mean is I select it to run (or the server runs it as scheduled) and then when I run it manually, there are records that have not been processed. So I checked logs  log. "Last Scripting Error (802)"
      Any recommendations how to resolve this?
       

    • By fmworm
      Hello Everyone,
      We are planning to use FileMaker server 17 on AWS. And for client, thinking of using AppStream 2.0.
      I would like to know if there is any sort of issues using Appstream 2.0, means, performance issue or any limited functionality.
      Also would like to take your suggestions, instead of using Appstream 2.0, is there any other solution or way to connect filemaker apps hosted on AWS.. without installing filemaker client on user. machine.
      Thanks in advance.
       
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.