I recently ran into a problem with adding an image to an LDAP server using CFLDAP. It appeared that the only way to pass an image into the CFLDAP was to readbinary it and then convert it to Base64. Passing that back to the server worked without error but the attribute jpegPhoto was stored as text. Since I was able to see other images where stored as binary, I knew something wasn’t right. I tried everything I could think of and posted my questions on many a board such as the wonderful mailing list at HouseOfFusion.com with this entry and this entry.
After many trials and tribulations, I was able to come up with a solution with the help of a colleague at work named Peter Jacoby (thanks Peter!) The solution involves using cffile to upload and readbinary into a variable and then doing a cfhttp post handing the file name to an aspx file that then handles the binary insert and prints a 1 if successful. I then look for a 1 in the cfhttp.fileContent to see if it is successful. If you read through the second entry link above you will find the code.
Thanks again Peter!
Vince Collins