I remember that it was possible to read the value for the users photo
attribute from a given file on the server by an IDM driver. We did this
in the old IDM 36 ATT utilizing the following function. The policy on
the driver simply put the returend value as an octet to the photo
attribute by calling the set-src-attr action.

function getB64ImageFromURL(urlString)
// return value - initialize to empty string
var retVal = "";
// input stream
var is;
// create java URL
var url = new URL(urlString);

// open URL to get input stream
is = url.openStream();

// create a StringWriter to write the base64 data
var sw = new StringWriter();

// create the Base64OutputStream to feed the StringWriter
var b64os = new Base64OutputStream(sw);

// feed the input stream the the Base64OutputStream

// flush and close the Base64OutputStream

// get the return value String from the StringWriter
retVal = sw.toString();
catch (exception)
return exception;
// always close the input stream if it was successfully opened
if (is)
return retVal;

Unfortunately this ain't work anymore. Can anybody provide an other
function or idea to read the value for the users photo from file by a
BTW: Are there any known limitations according the image format/size to
take into account?


tschloesser's Profile: https://forums.netiq.com/member.php?userid=3232
View this thread: https://forums.netiq.com/showthread.php?t=56340