<?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 Re: Upload To Content Library in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2484002#M21322</link>
    <description>&lt;P&gt;You can make rest calls to the Repository API from within the script. Have a look at all "monitor_XXX" data connections how to setup the authentication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem in this instance (i think) is how to pass the file content to the script and then to the rest body.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Sep 2024 11:44:33 GMT</pubDate>
    <dc:creator>stefanstoichev123</dc:creator>
    <dc:date>2024-09-27T11:44:33Z</dc:date>
    <item>
      <title>Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483806#M21315</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;
&lt;P&gt;Has anyone tried to upload files to a content library via the API?&lt;/P&gt;
&lt;P&gt;I've found this within the help &lt;A href="https://help.qlik.com/en-US/sense-developer/November2022/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Content-Library-Upload-File.htm#anchor-1" target="_blank" rel="noopener"&gt;https://help.qlik.com/en-US/sense-developer/November2022/Subsystems/RepositoryServiceAPI/Content/Sense_RepositoryServiceAPI/RepositoryServiceAPI-Content-Library-Upload-File.htm#anchor-1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;However, I can't figure out where to start?&amp;nbsp; Can anyone provide any advice or example API scripts please?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2024 16:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483806#M21315</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2024-09-26T16:08:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483951#M21317</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/26771"&gt;@jamelmessaoud&lt;/a&gt; ive spend some time on this API when i was working on &lt;A href="https://github.com/Informatiqal/qlik-repo-api" target="_self"&gt;qlik-repo-api&lt;/A&gt; package and can confirm that it took me a bit of time to wrap my head around it. But at the end the api end up being not so complicated ... just not much documentation/examples around it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have a look at my implementation of "uploadfile" endpoint - &lt;A href="https://github.com/Informatiqal/qlik-repo-api/blob/7efca18a82a72edf1f79c3e09690692baa057946/src/ContentLibrary.ts#L137" target="_blank"&gt;https://github.com/Informatiqal/qlik-repo-api/blob/7efca18a82a72edf1f79c3e09690692baa057946/src/ContentLibrary.ts#L137&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code there is doing a few more extra things and this is specific to my implementation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But in general to upload file you have to:&lt;/P&gt;
&lt;P&gt;- make request to: &lt;A href="https://my-sense" target="_blank"&gt;https://my-sense-server&lt;/A&gt;/qrs/contentlibrary/&amp;lt;LIBRARY NAME HERE&amp;gt;/uploadfile?externalpath=&amp;lt;PATH TO THE FILE&amp;gt;&lt;/P&gt;
&lt;P&gt;- include Content-Type header with the meme type of the file (ex. image/png)&lt;/P&gt;
&lt;P&gt;- the body is of type "multipart/form-data"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PATH TO THE FILE - this tells Qlik how/where to store the file. If you want the file to be in the library root folder then for this param enter the file name. If you want to upload the file to a specific subfolder then inlude the path to that subfolder as well (ex: folder1\folder2\my-file.png).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example if i pass "test\Image-2024-09-06-0518.png" for the "externalpath" then in QMC i can see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="stefanstoichev123_0-1727425147503.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172233i9EAB708C74171B26/image-size/medium?v=v2&amp;amp;px=400" role="button" title="stefanstoichev123_0-1727425147503.png" alt="stefanstoichev123_0-1727425147503.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(In the example above my content library is called "test123")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope that this makes it bit more clear &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Stefan&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 08:22:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483951#M21317</guid>
      <dc:creator>stefanstoichev123</dc:creator>
      <dc:date>2024-09-27T08:22:37Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483953#M21319</link>
      <description>&lt;P&gt;Thanks so much for this&amp;nbsp;@&lt;SPAN&gt;stefanstoichev1&lt;/SPAN&gt;&lt;WBR /&gt;&lt;SPAN&gt;23 !! This has definitely give me a great starting point &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I will let you know how it goes&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 08:37:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483953#M21319</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2024-09-27T08:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483991#M21321</link>
      <description>&lt;P&gt;Hi Stefan,&lt;/P&gt;
&lt;P&gt;Would I be able to achieve this by creating a new Rest connection?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jamelmessaoud_0-1727435132927.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172243i798610E687E60E7F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jamelmessaoud_0-1727435132927.png" alt="jamelmessaoud_0-1727435132927.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;At the moment when trying I get a the following error message&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jamelmessaoud_1-1727435180948.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172244iD63731D395AA53BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jamelmessaoud_1-1727435180948.png" alt="jamelmessaoud_1-1727435180948.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 11:07:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2483991#M21321</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2024-09-27T11:07:21Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2484002#M21322</link>
      <description>&lt;P&gt;You can make rest calls to the Repository API from within the script. Have a look at all "monitor_XXX" data connections how to setup the authentication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem in this instance (i think) is how to pass the file content to the script and then to the rest body.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 11:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2484002#M21322</guid>
      <dc:creator>stefanstoichev123</dc:creator>
      <dc:date>2024-09-27T11:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2484015#M21323</link>
      <description>&lt;P&gt;Ah yes of course.&amp;nbsp; I didn't think to check those connections! Thank you.&lt;/P&gt;
&lt;P&gt;I am hoping to achieve passing the file content via variables.&amp;nbsp; Just want to get the rest connection working first with manually entered text before I progress to this step... &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2024 11:51:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2484015#M21323</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2024-09-27T11:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Upload To Content Library</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2486847#M21375</link>
      <description>&lt;P&gt;Hi Stefan,&lt;/P&gt;
&lt;P&gt;Unfortunately, I still cannot get this working &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Would you be able to provide some guidance with regards to what needs to be added into the connection setup?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jamelmessaoud_0-1728904615426.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/172901i97A284A77E29D894/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jamelmessaoud_0-1728904615426.png" alt="jamelmessaoud_0-1728904615426.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I've tried to enter various things into this and nothing seems to work.. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 14 Oct 2024 11:17:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Upload-To-Content-Library/m-p/2486847#M21375</guid>
      <dc:creator>jamelmessaoud</dc:creator>
      <dc:date>2024-10-14T11:17:43Z</dc:date>
    </item>
  </channel>
</rss>

