<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Adding a Logo to a Brand via the API / SDK in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518070#M22203</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to add a logo to a brand via the API using the SDK, but I'm getting errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;qlik.brands.create(name=client_tenant["client_name"],logo="temp_files/logo.png")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's bringing me back the error:&lt;/P&gt;&lt;P&gt;qlik_sdk/utils.py", line 7, in get_mime_type&lt;BR /&gt;first_bytes = buffer.peek()&lt;BR /&gt;AttributeError: 'str' object has no attribute 'peek'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I create the Brand but omit the logo it works. 've tried adding the logo separately using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;files_dict = {"file":"temp_files/Logo.png"}

response = qlik_oauth_connection.client.rest(
                            
path=f"/brands/{brand_id}/files/logo",
                            method="POST",
                            params={},
                            data=None,
                            files=files_dict
                        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error&amp;nbsp;400 Client Error: Bad Request for url:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imagine it's something simple, although I'm stumped at the moment. Any help would be appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 16 May 2025 14:52:17 GMT</pubDate>
    <dc:creator>richardpearce60</dc:creator>
    <dc:date>2025-05-16T14:52:17Z</dc:date>
    <item>
      <title>Adding a Logo to a Brand via the API / SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518070#M22203</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I'm trying to add a logo to a brand via the API using the SDK, but I'm getting errors:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;qlik.brands.create(name=client_tenant["client_name"],logo="temp_files/logo.png")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's bringing me back the error:&lt;/P&gt;&lt;P&gt;qlik_sdk/utils.py", line 7, in get_mime_type&lt;BR /&gt;first_bytes = buffer.peek()&lt;BR /&gt;AttributeError: 'str' object has no attribute 'peek'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I create the Brand but omit the logo it works. 've tried adding the logo separately using:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;files_dict = {"file":"temp_files/Logo.png"}

response = qlik_oauth_connection.client.rest(
                            
path=f"/brands/{brand_id}/files/logo",
                            method="POST",
                            params={},
                            data=None,
                            files=files_dict
                        )&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get an error&amp;nbsp;400 Client Error: Bad Request for url:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Imagine it's something simple, although I'm stumped at the moment. Any help would be appreciated&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 14:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518070#M22203</guid>
      <dc:creator>richardpearce60</dc:creator>
      <dc:date>2025-05-16T14:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Logo to a Brand via the API / SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518368#M22209</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/213264"&gt;@richardpearce60&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;I don't know if this can help you troubleshoot this, but when using the Qlik-cli, this is they payload that is sent to the REST endpoint&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;POST &lt;A href="https://TENANT.REGION.qlikcloud.com/api/v1/brands" target="_blank"&gt;https://TENANT.REGION.qlikcloud.com/api/v1/brands&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;* Establishing connection to: TENANT.REGION.qlikcloud.com:443&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;* TLS Handshake started&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;* TLS Handshake done (352ms), version: TLS v1.3&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;* Connection established (816ms)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Host: TENANT.REGION.qlikcloud.com&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; User-Agent: qlik-cli/2.26.0 (darwin)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Transfer-Encoding: chunked&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Authorization: Bearer **omitted**&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Content-Type: multipart/form-data; boundary=6143ff2ea36c74340000a46387a39faec2ee3ea1989299a6302a83095d11&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Referer: &lt;A href="https://TENANT.REGION.qlikcloud.com" target="_blank"&gt;https://TENANT.REGION.qlikcloud.com&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Accept-Encoding: gzip&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PAYLOAD (MULTIPART):&lt;SPAN class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Content-Disposition: form-data; name="logo"; filename="FILEPATH/logo.png"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Content-Type: image/png&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PART:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;image data: 63215 bytes&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;gt; Content-Disposition: form-data; name="name"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;PART:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;BRANDNAME&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;------&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-------&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;The cli command I used is:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;qlik brand create -v --name BRANDNAME --file-logo FILEPATH/logo.png&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 15:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518368#M22209</guid>
      <dc:creator>Daniele_Purrone</dc:creator>
      <dc:date>2025-05-20T15:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Logo to a Brand via the API / SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518369#M22210</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/42559"&gt;@Daniele_Purrone&lt;/a&gt;&amp;nbsp;..&amp;nbsp;&lt;/P&gt;&lt;P&gt;We have been able to get it to work in Postmaster. I wasn't sure if CLI and PostMaster were doing something in the background with the binary file?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been googling and tried many different combinations, using the file open within the dictionary too {"Logo": open("temp_files/logo.png", "rb")}, but nothing seems to work.&lt;/P&gt;&lt;P&gt;We have 100 tenants, so we want to automate ...&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 15:25:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2518369#M22210</guid>
      <dc:creator>richardpearce60</dc:creator>
      <dc:date>2025-05-20T15:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Logo to a Brand via the API / SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2519459#M22234</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/1870"&gt;@Dave_Channon&lt;/a&gt;&amp;nbsp;Hi Dave, I was wondering&amp;nbsp;if you knew how to resolve this?&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 11:33:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2519459#M22234</guid>
      <dc:creator>richardpearce60</dc:creator>
      <dc:date>2025-05-29T11:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a Logo to a Brand via the API / SDK</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2540102#M22701</link>
      <description>&lt;P&gt;Did you fix this,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/213264"&gt;@richardpearce60&lt;/a&gt;?&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jan 2026 15:33:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Adding-a-Logo-to-a-Brand-via-the-API-SDK/m-p/2540102#M22701</guid>
      <dc:creator>Dave_Channon</dc:creator>
      <dc:date>2026-01-02T15:33:43Z</dc:date>
    </item>
  </channel>
</rss>

