[JDEV] Avatar images are per-resource

temas temas at box5.net
Wed Sep 5 14:34:17 CDT 2001


On Wed, 2001-09-05 at 12:05, Jens Alfke wrote:
> One more note on the avatar spec. I realized while in the shower this 
> morning that it's important that the image be stored in the public XML 
> associated with the resource, not in the XML for the user itself. 
> Otherwise multiple logins trying to set different images will stomp over 
> the image stored on the server.
> 
> I was unsure at the time (this was about while I was lathering my 
> armpits) whether the public-XML thingy supported per-resource storage, 
> but on looking at the very vague description 
> <http://docs.jabber.org/draft-proto/html/xml.html> it appears that it 
> does. The trick is to include your resource when sending the IQ 'set' to 
> yourself.
> 
> So to use an example, the provider of the image would store it on the 
> server as follows:
> 
> <iq id="1" type="set" to="me at myserver/myresource">
> 	<query xmlns="jabber-storage:iq:avatar>
> 		<data mimetype="image/jpeg"> ...Base64 image data goes here.. </data>
> 	</query>
> </iq>
> 
> The important thing to note is that the "to" address contains the 
> sender's resource. The requester would also need to include the resource 
> (as is already shown in the current avatar proposal.)
> 
> An additional thing I've done in the example is include a "mimetype" 
> attribute on the <data> element. I know I said earlier that the common 
> graphics formats are self-describing, but I think it's still safer to 
> tag the data. Not all OS's may have support for auto-detecting the image 
> type, and future image types may be harder to detect, and also this way 
> we could in the future include multiple <data> elements with different 
> MIME types and let the receiver easily pick out the best one.
> 
> --Jens
> 

Good thoughts, have you tested at all aginast the server?  I might give
it a try later today after I work on file transfer for gabber some.  If
no one minds about these changes I'll go ahead and update the proposed
spec on core.  The storage namesapce works for me too.

--temas



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL: <https://www.jabber.org/jdev/attachments/20010905/3c4f8a65/attachment-0002.pgp>


More information about the JDev mailing list