public class ProfileImage extends Object
This is a wrapper class which contains fields for all types of profile images. Only one field will be set at any given time.
Use the getBinary or getUrl methods to do the work and return the data as either a String or byte[]. If String, this will be a URL/URI you can use directly. If byte[] this will be the uploaded image. Consult both.
Note. Eventually, this will return only Strings. The byte[] will be base64 encoded and returned as a data URI you can use, however this is not supported in browsers older than IE8 (Safari, Firefox, Chrome, all ok though).
You can get alt text for the image via getAltText()
This is not related to the similarly named hibernate model (hbm.model.ProfileImage)
| Constructor and Description |
|---|
ProfileImage() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getBinary()
Get access to the binary data from either the uploaded image or the base64 encoded data
|
String |
getUrl()
Get access to the URL from either the external image that a user can set, or an official image.
|
public byte[] getBinary()
public String getUrl()
Copyright © 2008–2018 The Sakai Foundation. All rights reserved.