Dimitar,
You could try something like the following, which requires two steps. The
first page uses a .cfm file as the source of an image, passing it the user's
'uid' value. The second page (the one that queries the LDAP server) uses
CFCONTENT and the query result to form the proper MIME type of 'image/jpeg'
that gets returned to Page1.cfm.
As a note, some jpegs use the image/pjpeg MIME type (photoshop).
Page1.cfm:
<img src="ldap.cfm?uid=#userid#">
Ldap.cfm:
<cfldap action="QUERY" name="Test" attributes="uid,
mail,guradiusprofile,jpegphoto" start="ou=Specials, o=University.EDU,c=US"
scope="SUBTREE" filter="(uid=#url.uid#)" server="ldap.university.edu">
<cfcontent type="image/jpeg">
#Test.jpegphoto#
Dain Anderson
Caretaker, CF Comet
http://www.cfcomet.com/
----- Original Message -----
From: "Dimitar Michailov" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, June 01, 2001 1:23 PM
Subject: LDAP and binary files
> Hello everybody:
>
> I have been going through the archives but with no success....
>
> I need to query a LDAP directory for a user and show their picture. I
> execute the LDAP query but I am not able to show the picture information
> (JPEG file).
>
> <cfldap action="QUERY" name="Test" attributes="uid,
> mail,guradiusprofile,jpegphoto" start="ou=Specials, o=University.EDU,c=US"
> scope="SUBTREE" filter="(uid=userid)" server="ldap.university.edu">
>
>
> Then, if I try to output the JPEGPHOTO all I see on the screen is '����'
> which, if I try to TOBINARY() I get the first 5 characters of the image
> file.
>
> The problem and the question is - why I am getting only the first 5
> characters (in TOBASE64 format) of the JPEG image. Am I missing something?
>
> Thanks for the help.
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists