I have a BASE 64 image string being sent to my app via a REST API.

Can anyone suggest the easiest way to take that string and convert it to an Aware IM Picture Attribute please?

Mark,

Do you have any control on how the data is being sent to your app?
The data needs to be in a specific format.
see:

Well, looks like it can be done in Python.

While I already call some Python code in my app but am not sure how to run a Python script from Aware that takes parameters.

Any ideas would be really appreciated please.

what i would do is make a batch program to call python.
and test it from the command line outside of aware. cleaner and gets rid of quoting issues and parameter passing challenges.

(and it would work better in powershell, than batch files, from my experience.)

here's an example to run imagemagick passing some parms:

EXECUTE PROGRAM SystemSettings.DQ + 'c:\Program Files\ImageMagick\magick.exe' + SystemSettings.DQ + ' ' + EstimatePictures.PicPath + ' -rotate 90 ' + LoggedInStaffMembers.tmp_Filename

Screen Shot 2023-04-13 at 10.59.12 PM.png

powershell:

EXECUTE PROGRAM 'powershell -File C:\users\jaymer\cars\login.ps1' + AA.theRegID

Screen Shot 2023-04-13 at 11.02.49 PM.png

So now you are starting PS telling it to run a PS program, with an input parm

As usual, the Server Output window will be your friend.

5 days later

In the latest build 3136 it is possible to convert the data using a simple assignment:

Object.PictureAttribute = Object.StringAttributeThatHasBase64Image

a year later
Jaymer wrote

EXECUTE PROGRAM SystemSettings.DQ + 'c:\Program Files\ImageMagick\magick.exe' + SystemSettings.DQ + ' ' + EstimatePictures.PicPath + ' -rotate 90 ' + LoggedInStaffMembers.tmp_Filename

Screen Shot 2023-04-13 at 10.59.12 PM.png

Jaymer,
I am trying to execute a PowerShell file but it is not creating the folders I need.
EXECUTE PROGRAM powershell -FILE C:\AwareIM_Docs\BuildDateFoldersForEntireYear.ps1 NO WAIT

NO WAIT is there because without it focus never returns to AwareIM the processing circle just spins.
I had to do the same thing when executing BCP Commands.

Can you see an issue with this rule?
This is on AwareIM v9 (3279)

I was able to get it to work.
This works, EXECUTE PROGRAM powershell C:\AwareIM_Docs\BuildDateFoldersForEntireYear.ps1 NO WAIT

I'll change the path to be dynamic later.

Odd how -FILE has different behavior for you and I