<?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: Download a file in a personal folder on Viya in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Download-a-file-in-a-personal-folder-on-Viya/m-p/761419#M240943</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279678"&gt;@MaT721&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if what I am suggesting is the best way but I think it will work...you can use the SAS Viya REST API to create a compute server session and then submit SAS code which assigns a fileref that points to your image that you want to download and then download it using this API:&amp;nbsp;&lt;A href="https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option which I am not sure will work is to somehow use the Files API but I am not sure if it can be used to access files on disk or just files in the SAS Content Server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Aug 2021 13:34:53 GMT</pubDate>
    <dc:creator>miaeyg</dc:creator>
    <dc:date>2021-08-13T13:34:53Z</dc:date>
    <item>
      <title>Download a file in a personal folder on Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Download-a-file-in-a-personal-folder-on-Viya/m-p/761363#M240924</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my personal folder, which you can see in the image below, I have images in PNG format that I would like to download automatically with code.&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="image.png" style="width: 347px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/62541iB11B4DADD1AB01B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I right click on one of the images and choose download I can see the link that is generated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;A href="https://host:port/SASStudioV/sasexec/sessions/ce621d14-131743d0-908e-b223a6250a68/workspace/download?path=...&amp;amp;filename=....png" target="_blank"&gt;https://host:port/SASStudioV/sasexec/sessions/ce621d14-131743d0-908e-b223a6250a68/workspace/download?path=...&amp;amp;filename=....png&lt;/A&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The part between sessions and workspace changes with each new connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to do with proc http ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 07:52:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Download-a-file-in-a-personal-folder-on-Viya/m-p/761363#M240924</guid>
      <dc:creator>MaT721</dc:creator>
      <dc:date>2021-08-13T07:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Download a file in a personal folder on Viya</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Download-a-file-in-a-personal-folder-on-Viya/m-p/761419#M240943</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/279678"&gt;@MaT721&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am not sure if what I am suggesting is the best way but I think it will work...you can use the SAS Viya REST API to create a compute server session and then submit SAS code which assigns a fileref that points to your image that you want to download and then download it using this API:&amp;nbsp;&lt;A href="https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file" target="_blank"&gt;https://developer.sas.com/apis/rest/v3.5/Compute/#download-a-file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Another option which I am not sure will work is to somehow use the Files API but I am not sure if it can be used to access files on disk or just files in the SAS Content Server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;Eyal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Aug 2021 13:34:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Download-a-file-in-a-personal-folder-on-Viya/m-p/761419#M240943</guid>
      <dc:creator>miaeyg</dc:creator>
      <dc:date>2021-08-13T13:34:53Z</dc:date>
    </item>
  </channel>
</rss>

