<?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: How to add a file/member to a SAS Content folder using SAS API? in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935483#M2469</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13766"&gt;@EyalGonen&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Yes, a text file should be fine. In my example (see below) I use a csv file. In order to provide the file path, I went to the Body section, created a new file Key and provided the path from my client as the Value.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joeFurbee_1-1720708193890.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98318iA3A3C713AE4D4BD9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joeFurbee_1-1720708193890.png" alt="joeFurbee_1-1720708193890.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've not tried with .jpg. Would be interested if that works or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2024 14:30:03 GMT</pubDate>
    <dc:creator>joeFurbee</dc:creator>
    <dc:date>2024-07-11T14:30:03Z</dc:date>
    <item>
      <title>How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935433#M2464</link>
      <description>&lt;P&gt;I need to upload a file from my local disk to a SAS Content folder. I am using the SAS REST APIs for this.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am a bit confused reading the API doc on &lt;A href="https://developers.sas.com" target="_blank"&gt;https://developers.sas.com&lt;/A&gt;. On the one hand in the "folders" API there is an &lt;A href="https://developers.sas.com/rest-apis/folders-v5?operation=createFolderMember" target="_self"&gt;option&lt;/A&gt; to add a "member" to an existing folder. On the other hand, on the "files" API there is an &lt;A href="https://developers.sas.com/rest-apis/files-v9?operation=createNewFile" target="_self"&gt;option&lt;/A&gt; to create a new file. Not sure what to use and what is the relationship between the two.. Any advice?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 09:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935433#M2464</guid>
      <dc:creator>EyalGonen</dc:creator>
      <dc:date>2024-07-11T09:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935464#M2466</link>
      <description>The files service has an optional parentFolderUri query parameter you can use to specify the folder the file should be added to (/folders/folders/folder_id), but uploading a file does not require it be referenced by SAS Content (folders service). When you specify parentFolderUri, the files service will call the folders service to confirm there is not already a file with that name in the folder, and add the file as a member for you if it is not already a member of that folder.&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Jul 2024 13:44:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935464#M2466</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2024-07-11T13:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935468#M2467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13766"&gt;@EyalGonen&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;You can use the &lt;A href="https://developers.sas.com/rest-apis/dataTables-v3?operation=createTableFromMultipart" target="_self"&gt;Upload a file&lt;/A&gt; end point under the &lt;A href="https://developers.sas.com/rest-apis/dataTables-v3" target="_self"&gt;dataTables API&lt;/A&gt;. I'm attaching a Postman collection with example usage. Look in step 2. upload data for an example.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 13:50:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935468#M2467</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2024-07-11T13:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935474#M2468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need to upload text files such SAS programs or binary files like JPG files. Is your solution appropriate for these use cases?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 14:04:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935474#M2468</guid>
      <dc:creator>EyalGonen</dc:creator>
      <dc:date>2024-07-11T14:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935483#M2469</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13766"&gt;@EyalGonen&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Yes, a text file should be fine. In my example (see below) I use a csv file. In order to provide the file path, I went to the Body section, created a new file Key and provided the path from my client as the Value.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="joeFurbee_1-1720708193890.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/98318iA3A3C713AE4D4BD9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="joeFurbee_1-1720708193890.png" alt="joeFurbee_1-1720708193890.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've not tried with .jpg. Would be interested if that works or not.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 14:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/935483#M2469</guid>
      <dc:creator>joeFurbee</dc:creator>
      <dc:date>2024-07-11T14:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988189#M3089</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/214450"&gt;@joeFurbee&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry for the (very) late reply...&lt;/P&gt;
&lt;P&gt;I just came back to this (doing it on my free time) and I am using this API:&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis/files/createNewFile" target="_blank"&gt;https://developer.sas.com/rest-apis/files/createNewFile&lt;/A&gt;&amp;nbsp;to upload local client files to the SAS Files service and in addition I am&amp;nbsp; passing the&amp;nbsp;&lt;SPAN&gt;parentFolderUri parameter as explained here&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis/files/createNewFile#query-parameters" target="_blank"&gt;https://developer.sas.com/rest-apis/files/createNewFile#query-parameters&lt;/A&gt;&amp;nbsp; to attach the uploaded file to some SAS Content folder.&lt;/P&gt;
&lt;P&gt;This works BUT I cannot find a way to specify the filename to be displayed in the SAS Content folder. The uploaded file appears in the SAS Content folder with this name:&amp;nbsp;FileResource1779021791076 where the digits are changing with each file I upload.&lt;/P&gt;
&lt;P&gt;I am testing on Viya 3.5 so maybe it is different for SAS Viya.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea how to control the uploaded filename as seen in the SAS Content folder?&lt;/P&gt;</description>
      <pubDate>Sun, 17 May 2026 12:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988189#M3089</guid>
      <dc:creator>EyalGonen</dc:creator>
      <dc:date>2026-05-17T12:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988224#M3090</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13766"&gt;@EyalGonen&lt;/a&gt; you can pass the file name in the "Content-Disposition" header. e.g. Content-Disposition: filename="test.txt"</description>
      <pubDate>Mon, 18 May 2026 18:56:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988224#M3090</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2026-05-18T18:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988254#M3091</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/78975"&gt;@gwootton&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! It works now!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one more question about the query parameter "&lt;SPAN&gt;typeDefName" here:&amp;nbsp;&lt;A href="https://developer.sas.com/rest-apis/files/createNewFile#query-parameters" target="_blank"&gt;https://developer.sas.com/rest-apis/files/createNewFile#query-parameters&lt;/A&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Where can I find the possible values for this parameter?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;All files I uploaded are with type="file" in SAS Content and I want to change at least for SAS programs.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 May 2026 05:32:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988254#M3091</guid>
      <dc:creator>EyalGonen</dc:creator>
      <dc:date>2026-05-19T05:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a file/member to a SAS Content folder using SAS API?</title>
      <link>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988295#M3092</link>
      <description>You could call the REST API /types/types to retrieve all the types defined in the types registry. The "name" attribute for each would be what could be used in typeDefName.</description>
      <pubDate>Tue, 19 May 2026 15:03:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/How-to-add-a-file-member-to-a-SAS-Content-folder-using-SAS-API/m-p/988295#M3092</guid>
      <dc:creator>gwootton</dc:creator>
      <dc:date>2026-05-19T15:03:05Z</dc:date>
    </item>
  </channel>
</rss>

