Skip to main content
MindTouch Success Center

site/logo.png (PUT)


Save a new site logo image

  • REST Method: PUT
  • Method Access: internal

Query Parameters

Name Type Description
authenticate bool? Force authentication for request (default: false)

Message Format


Implementation Notes

The logo image is converted to PNG with a width and height specified by the ui/logo-maxwidth and ui/logo-maxheight config settings. You can also make a call to PUT:site/logo and achieve the same results.

C# Sample: Set Site Logo

The following code example uploads the file "myfile.jpg" as the site logo:

Sample Code

Plug p = Plug.New("http://deki-hayes/@api/deki");
p.At("users", "authenticate").WithCredentials("admin", "password").Get();
DreamMessage msg = DreamMessage.FromFile("c:\\temp\\myfile.jpg");
msg = p.At("site", "logo").Put(msg);

Implementation notes 

Add notes about requirements or config values

Curl Sample: Set Site Logo

The following command sets foo.jpg as the site logo.

Sample Code

curl -u admin:password -H "Content-Type: image/jpg" -T foo.jpg

Implementation notes 

curl flags

Basic HTTP authentication. Sends a username and password to server so it can verify whether a user is of privilege to perform specific operation.
-T file
Specifies a PUT request and the file to send.
Replaces or appends an HTTP header. The "Content-Type" header specifies the MIME type of the image. Make sure the correct type is used or the image might not display correctly.
Includes the HTTP response header in the output. Useful for debugging.


ADMIN permission is required to execute above command. Otherwise, a 403 HTTP response (Forbidden) will be returned.


The following command sets trollface.jpg as the site logo.

Sample Code

curl -u admin:password -H "Content-Type: image/jpg" -T trollface.jpg -i

HTTP Response Headers

HTTP/1.1 200 OK
Date: Wed, 13 Jan 2010 21:45:46 GMT
Server: Dream-HTTPAPI/
Content-Disposition: inline; creation-date="Wed, 13 Jan 2010 21:45:45 GMT"; filename="logo.png"; size=20827
Cache-Control: must-revalidate,private
Vary: Accept-Encoding
Last-Modified: Wed, 13 Jan 2010 21:45:45 GMT
ETag: Wed, 13 Jan 2010 21:45:45 GMT
X-Deki-Site: id="default"
Content-Type: image/png
Content-Length: 20827
Via: 1.1 dekiwiki


  • Was this article helpful?