Hello,
The approach will be the same, where you will need to save a picture to a custom Binary attribute. In the script, you will use the below code to obtain the attribute value and then you can proceed with saving it to a SharePoint folder as a file.
$copyFromPropertyName = "adm-CustomAttributeBinary1" # TODO: modify me
# Get the picture
try
{
$photoBytes = $Context.TargetObject.Get($copyFromPropertyName)
}
catch
{
$Context.LogMessage("No picture specified in attribute $copyFromPropertyName.", "Warning")
return # No picture
}
Unfortunately, we do not have any scripts for saving the contents of a Binary attribtue to a file, but the following thread might be helpful: https://stackoverflow.com/questions/926935/rails-saving-the-contents-of-a-binary-field-to-a-file.