[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: jpegPhoto attribute

On Mon, Dec 13, 1999 at 03:48:22PM -0700, Daniel Hanks wrote:
> Hmm,
> 	That looks like it would work if the only thing I was displaying
> on the page was the photo, but if I want to display the image in the
> context of other text and such, is that possible? Maybe I'm just not
> familiar enough with how the Content-type stuff works. You can't just
> change your Content-type mid-page can you?

If anyone wonders, get_values_len exists in PHP now, so it is possible.
To do what you want, you may create a PHP script that just outputs the
picture with the right content-type, then use image-source to include
it. You might consider passing it the DN as a parameter, there's a
problem if there are several values though. I think the optimal
solution is to retrieve all data in one LDAP query, and store any
pictures in temporary files on the webserver. Then you don't have to
care about content-type either.

I think it's neat to not have to store the jpegs on the webserver, but
there's no good way to do it, except retrieving the same data several
times (would be great to know number of values of an attribute without
retrieving the data) and relying on the values being in a constant order
so that you can do several independent queries showing only one value
each time. With N values, you end up fetching N(N+1) pictures (N+1
queries getting all N each time).