Skip to content

Commit

Permalink
SAK-41518 Profile Tool - Adding a new profile picture functionality u…
Browse files Browse the repository at this point in the history
…sing the pictures tab in profile tool is not working as expected. (sakaiproject#7608)
  • Loading branch information
Miguel Pellicer authored Nov 28, 2019
1 parent 690e9b8 commit bfa11c8
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
*/
package org.sakaiproject.profile2.tool.components;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebComponent;
import org.apache.wicket.model.IModel;
import org.sakaiproject.profile2.util.ProfileConstants;
import java.util.concurrent.TimeUnit;

/**
* Renders a user's profile image via the direct entity URL.
Expand Down Expand Up @@ -73,8 +73,8 @@ protected void onComponentTag(ComponentTag tag) {
}
}

//Cache for a minute
String url = "/direct/profile/"+userUuid + "/image" + sizePart + "?t=" + TimeUnit.MILLISECONDS.toMinutes(System.currentTimeMillis());
//Force a reload
String url = "/direct/profile/"+userUuid + "/image" + sizePart + "?v=" + RandomStringUtils.randomAlphabetic(10);

tag.put("src", url);
tag.put("alt", "User profile image");
Expand Down

0 comments on commit bfa11c8

Please sign in to comment.