0
votes

I found this piece of documentation that suggests that we should be able to PUT a new logo in a community. But the documentation also states that it is ignored on input. Before we start intensive troubleshooting, it would help if someone could confirm that we can indeed change the logo programmatically.


Use the web address in the href attribute to obtain an image that represents the community's logo. The following operations are supported: GET Use the web address in the href attribute to obtain the community logo image file. If a logo has not been set, a default image is returned. PUT Use the web address in the href attribute to upload a new community logo image and replace the current one.

Attention: Specify the content type of the image file being sent with the request. For example: "Content-Type: image/jpeg"


This is the source:

http://www-10.lotus.com/ldd/appdevwiki.nsf/xpDocViewer.xsp?lookupName=IBM+Connections+4.5+API+Documentation#action=openDocument&res_title=Community_entry_content_ic45&content=pdcontent

3
When you really mimic the browser (sending ltpa tokens, session cookies etc..) using a low level http client , we have got it to work.mpjjonker

3 Answers

1
votes

Using the IBM SBT SDK 1.0.1 I was able to call CommunityService.updateCommunityLogo(new File("/path/to/my.jpeg"), communityUuid) without any error, but the JPEG I referred to was not set as the community logo however.

Maybe the size was not correct?

Sorry for this "non-answer", but it may help other people anyway: To fix the SBT SDK code at least :-/

UPDATE 2014-JUN-25:

I took a deeper dive into the http.wire logs, and surprisingly the call seems to trigger a logout (or session invalidation) without further notice. The REST request receives 200 OK but also some JavaScript looking like "hey guy, confirm who you are", and the browser prompts with a full-window Connections login prompt, although the LTPA token should not have timed out yet.

This is annoying, too, for another reason: If Connections is used inside a framed UI, the "main" application is wiped away after that, forcing Connections to full-window mode.

1
votes

With IBM SBT SDK 1.0.3 (as of July 17, 2014) and IC5 it is working now. I had no opportunity to test this feature with 1.0.3 and IC45 however, but with 1.0.2 and IC5 it did NOT work; so it seems that something in 1.0.3 has been fixed here.

0
votes

@mpjjonker you can look at CommunityService.java

the method updateCommunityLogo talks about using /communities/service/html/image URL to put the image.

String url = "/communities/service/html/image";
getClientService().put(url, parameters, headers, file, ClientService.FORMAT_NULL);