Hello all,

It appears that based on Oblio's previous suggestion, binaryEncode(data, 
"Hex") might be what I'm looking for.  However, binaryEncode() appears 
to be new to CF 7.  My client is still on 6.1 and doesn't have the funds 
(or will) to move to 7 yet (argh).

Is there something like a binaryEncode(data, "Hex") in CF 6.1 or another 
way to achieve this with cf 6.1?

Thanks in advance




Leitch, Oblio wrote:
> I can't offer any help with LDAP, but if your LDAP server can receive
> data in another way, you can use binaryEncode(data, ["hex","base64"]).
>
> Oblio
>
> -----Original Message-----
> From: Vince Collins (NHJobs.com) [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, March 20, 2007 3:20 PM
> To: CF-Talk
> Subject: CFLDAP uploading Image (binary)
>
> I've hit a wall and have a question.
>
> I have been able to write a form that allows the updating of all text 
> fields within the LDAP directory using cfldap.  What I need now is to 
> provide the ability to upload an image and store that within LDAP.
>
> Here is where it breaks.
>   <!--- upload file --->
>   <cffile action="upload" filefield="seljpegPhoto" 
> destination="#root#\update\upload" nameconflict="makeunique">
>   <!--- read file as binary --->
>   <cffile action="READBINARY" 
> file="#root#\update\upload\#file.serverfile#"
> variable="BinaryImageContent">
>   <!--- Replace with new image --->
>   <cfldap action="modify"
>            DN="#qry_get_one_emp.distinguishedName#"
>            attributes="jpegPhoto=#BinaryImageContent#"
>            modifytype="replace"
>            server="#LDAPServer#"
>            username="#LDAPUsername#"
>            password="#LDAPPassword#">
>
> The resulting error:  "ByteArray objects cannot be converted to
> strings."
>
> If I change the above to
>   attributes="jpegPhoto=#ToBinary(BinaryImageContent)#"
> it is redundant and causes the same error.
>
> Is there some switch I am missing or something else I need to do in 
> order to let CFLDAP know this is binary and to allow the update?  I have
>
> found NO information on how to upload a binary object into LDAP using 
> CFLDAP.
>
> Any help would be greatly appreciated!
>
> Vince
>
>
>
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 by AdobeĀ®
Dyncamically transform webcontent into Adobe PDF with new ColdFusion MX7. 
Free Trial. http://www.adobe.com/products/coldfusion?sdid=RVJV

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273371
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to