Portraits
Contents
Portraits#
Plone users have the option to upload a portrait to their profile. This profile is used in several places in Plone's user interface, like in the comments view.
Get self portrait#
You can request your own user portrait by issuing a GET
request to the root URL appending /@portrait
:
GET /plone/@portrait HTTP/1.1
curl -i -X GET http://nohost/plone/@portrait
http http://nohost/plone/@portrait
requests.get('http://nohost/plone/@portrait')
The server will respond with a Status 200
and the image requested (not JSON). The content type is set accordingly. One can use it directly in HTML src
properties:
HTTP/1.1 200 OK
Content-Type: image/png
The server will respond with a Status 404
in case that the portrait is not set.
GET /plone/@portrait HTTP/1.1
curl -i -X GET http://nohost/plone/@portrait
http http://nohost/plone/@portrait
requests.get('http://nohost/plone/@portrait')
HTTP/1.1 404 Not Found
Get specific user portrait#
You can request the portrait for a specific user username
by issuing a GET
request to the root URL appending /@portrait/username
:
GET /plone/@portrait/username HTTP/1.1
curl -i -X GET http://nohost/plone/@portrait/username
http http://nohost/plone/@portrait/username
requests.get('http://nohost/plone/@portrait/username')
The server will respond with a Status 200
and the image requested (not JSON). The content type is set accordingly. One can use it directly in HTML src
properties:
HTTP/1.1 200 OK
Content-Type: image/png