I was told when I began this project by the LDAP administrator that it 
is storing images in base64.  So I just encoded the binary file as 
toBase64() and the database took it just fine but it actually wasn't 
just fine.  All images uploaded my my tool where corrupt.  By using a 
third party tool, the images showed as corrupt with errors like "may be 
partially truncated or otherwise invalid".  Using a third party tool it 
also qualified my newly uploaded images at "Text Attributes" while the 
other good images were qualified as "Binary Attributes". 

As you say, it appears something might be lost in translation between 
cfldap and the underlying Java code.

I have never worked with Java before and am a bit nervous venturing into 
it today but at this point, if I'm going to call myself a programmer, I 
suppose I better attempt to actually be one and take this challenge on.

Thanks for your help, I will now look into trying to figure out what 
CFLDAP is calling and go from there.

Best Regards,



Leitch, Oblio wrote:
> I second this.  Remember, because CF is "typeless", when it tries to
> write to output binary in the <cfldap> tage, it might be expecting a
> string, not binary.  How they've chosen to output the attributes, I
> don't know, but that might cause it to fail.
>
> I would double (triple?) check that the data sent through LDAP is, in
> fact, binary or encoded (base64 or hex or uuencode, etc).  I wouldn't
> use a tool to do that as it might be altering results.  Rather, try a
> packet sniffer to see what the actual contents are.  If it's encoded,
> your life will be easier.  If not, then you're probably going to have to
> investigate some Java-based alternative.
>
> My experience: I wanted a way to compress data. Specifically, I thought
> there should be a way to feed data through a CF function and get a
> compressed result.  Since there's nothing that does it natively, I
> turned to Java.  Java has a native GZipDataStream - very slick.  The
> trouble was getting the data from CF -- it could only come and go as a
> "String".  I ended up requiring it to be base64 encoded to and from, and
> decode it once it was inside Java.  (now I have a tag that will compress
> a datastream without writing to disk.  I use it for squashing wddx
> packets for storage in a database)
>
> I think it was the "interface" they've written for custom CFX that's the
> limiter.
>
> -----Original Message-----
> From: Dinner [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, March 22, 2007 7:42 PM
> To: CF-Talk
> Subject: Re: LDAP Anyone?
>
> On a totally different note:
>
> Why not use some java solution?  I bet you could even do something
> along the lines of cfmail, where CF has javamail (iirc), which totally
> rocks, but of which CF exposes only a tiny bit.
>
> Find what CF uses for LDAP, research it, and call it yourself using
> createObject(), if even just for the image upload stuff.
>
> Whenever I've run into a problem like that (IMAP stuff, in my case),
> I've found using the underlying java will do what CF couldn't, if in
> fact CF can't.
>
> HIH, and if you have questions about how to leverage some java
> package, feel free to ask.  Maybe jldap ( openldap.org)?  Eh...
>
> Force be with you!
>
> This email message may contain privileged and/or confidential information. If 
> you are not the intended recipient(s), you are hereby notified that any 
> dissemination, distribution, or copying of this email message is strictly 
> prohibited. If you have received this message in error, please immediately 
> notify the sender and delete this email message from your computer.
>
> CAUTION: The Agency of Human Services cannot ensure the confidentiality or 
> security of email transmissions.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:273505
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
  • Re: LDAP Anyone? Vince Collins (NHJobs.com)

Reply via email to