<?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 Help on REST API to upload new document to folder in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/help-on-rest-api-to-upload-new-document-to-folder/m-p/19763#M8733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Upload a text document to a folder in Alfresco&amp;nbsp;seems not working using Rest API. I have a site named R02, under documentLibrary has a folder bank1. I am using Postman rest client tool.&lt;/P&gt;&lt;P&gt;POST:&amp;nbsp;&lt;SPAN style="color: #505050; background-color: #fafafa; font-size: 12px;"&gt;&lt;A href="http://76eiss.trial.alfresco.com/alfresco/service/api/upload?alf_ticket=TICKET_a314df3eb2e0ac986b26e0b365d58a2793528e7b" rel="nofollow noopener noreferrer"&gt;http://76eiss.trial.alfresco.com/alfresco/service/api/upload?alf_ticket=TICKET_a314df3eb2e0ac986b26e0b365d58a2793528e7b&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #505050; background-color: #fafafa; font-size: 12px;"&gt;Header: Authorization:&amp;nbsp;[{"key":"Authorization","value":"Basic YmlsbHd5dWFuQHlhaG9vLmNvbToxMjM0eXVhbg==","description":""}]&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Request body&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"filedata":"any text",&lt;BR /&gt;"filename": "test1.txt"&lt;BR /&gt;"description": "example"&lt;BR /&gt;"siteid":"r02",&lt;BR /&gt;"containerid":"documentlibrary" ,&lt;BR /&gt;'uploaddirectory': 'bank1'&lt;/P&gt;&lt;P&gt;}&amp;nbsp;&lt;/P&gt;&lt;P&gt;also tried:&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "filedata": "textxxxxxl",&lt;BR /&gt; "filename": "test1.txt",&lt;BR /&gt; "description": "example",&lt;BR /&gt; "siteid": "r02",&lt;BR /&gt; "containerid": "508440fc-1578-45a5-b4f7-87eb5ea6f40a"&lt;/P&gt;&lt;P&gt;} &lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "filedata": "@test.txt",&lt;BR /&gt; "filename": "abc.text",&lt;BR /&gt; "siteid": "r02",&lt;BR /&gt; "&lt;SPAN&gt;containerid&lt;/SPAN&gt;": "workspace:\/\/SpacesStore\/99c6f662-242f-4917-85bb-ae5a9b8454e8"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In response, it always return 502 bad gateway. I also tried a community edition 5.0.d. Not success.&amp;nbsp; Does anyone see the problem I have?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you very much!&lt;/P&gt;&lt;P&gt;Bill&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://connect.hyland.com/legacyfs/online/alfresco/17656_pastedImage_2.png" style="width: 620px; height: 316px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Nov 2017 20:35:59 GMT</pubDate>
    <dc:creator>billwyuan</dc:creator>
    <dc:date>2017-11-12T20:35:59Z</dc:date>
    <item>
      <title>Help on REST API to upload new document to folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/help-on-rest-api-to-upload-new-document-to-folder/m-p/19763#M8733</link>
      <description>Upload a text document to a folder in Alfresco&amp;nbsp;seems not working using Rest API. I have a site named R02, under documentLibrary has a folder bank1. I am using Postman rest client tool.POST:&amp;nbsp;http://76eiss.trial.alfresco.com/alfresco/service/api/upload?alf_ticket=TICKET_a314df3eb2e0ac986b26e0b365d58a2</description>
      <pubDate>Sun, 12 Nov 2017 20:35:59 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/help-on-rest-api-to-upload-new-document-to-folder/m-p/19763#M8733</guid>
      <dc:creator>billwyuan</dc:creator>
      <dc:date>2017-11-12T20:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Help on REST API to upload new document to folder</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/help-on-rest-api-to-upload-new-document-to-folder/m-p/19764#M8734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The upload webscript expects HTML form data. Have you tried specifying the Content-Type as&amp;nbsp;&lt;SPAN style="color: #242729; background-color: #eff0f1;"&gt;application/x-www-form-urlencoded&lt;/SPAN&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Nov 2017 08:33:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/help-on-rest-api-to-upload-new-document-to-folder/m-p/19764#M8734</guid>
      <dc:creator>marktielemans</dc:creator>
      <dc:date>2017-11-14T08:33:07Z</dc:date>
    </item>
  </channel>
</rss>

