AnsweredAssumed Answered

Base64 renaming Image and File Extension

Question asked by georgedrohan on Sep 17, 2018
Latest reply on Sep 18, 2018 by beverly

Hi.

I would like to take a picture in Filemaker go and have the Image name to be a Custom Name. Images are often Exported from the Solution and I would like a simple name to go with the Exported Image.  Not the Native IOS format , i think its, Date& Device,&...

 

Problem: My current work around has 2 Containers using Base64 decode and encode to rename the Container.  I end up having original container and a new renamed Container.  I would only like to have 1 Container due to harddrive space.

 

I do want to use a 3rd party paid plug in. 

I do not want to use a External Computer, and I would like it to be not in a script, so no;

Set Variable [ $file ; "file:" &  get(documentspath) & "yourFileName" & ".jpg" ]

Export Field Contents

 

I understand  that a script could run if the Solution was used a Desktop to Import of images. The imports  could be flagged and run a script based off the flag data to rename.  This is not what I'm looking to do.

 

Currently:

My  current Solution I have a button that Inserts from Device, a picture from the Camera, into a Container name "Photo Container"

That Container is Displayed on screen

 

I have a Calculation Type name  "Extension" that Grabs the File Extension from  the Image name;

Let (

a = GetContainerAttribute ( photo container ; "filename" ) ;

RightWords ( Substitute ( a ; "." ; ¶ ) ; 1 )

)

 

I have a 2nd Container Field named "Photo Container Rename" with the Following Calculation to changes the name and adds correct Extension.  ID is Auto Enter Serial Type

Base64Decode ( Base64Encode ( photo container ) ;id&"."  & extension)

 

This Solution gives me Two Images the Original and the Rename.

Due to hard drive Space I would like to have 1.

Suggestions?  A Way to combine all my calculation fields into ONE the Original/First Container  "Photo Container"?

 

Thanks in Advance

Outcomes