<?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 Set a property of type d:content via REST API in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67704#M22556</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How would I create a new node with d:content property via REST API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I created a custom type containing a property of type d:content:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&amp;lt;type name="thy:daniilFolder"&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;title&amp;gt;Daniil Folder&amp;lt;/title&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;parent&amp;gt;cm:folder&amp;lt;/parent&amp;gt; &lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&amp;lt;properties&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;property name="thy:folderProp"&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;type&amp;gt;d:text&amp;lt;/type&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;property name="thy:folderDoc"&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;type&amp;gt;d:content&amp;lt;/type&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;mandatory&amp;gt;false&amp;lt;/mandatory&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;index enabled="true"&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;atomic&amp;gt;false&amp;lt;/atomic&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;stored&amp;gt;false&amp;lt;/stored&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;tokenised&amp;gt;true&amp;lt;/tokenised&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/index&amp;gt;&lt;BR /&gt; &lt;SPAN style="background-color: #f6f6f6;"&gt;&amp;nbsp; &amp;nbsp; &lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&amp;lt;/property&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;lt;/properties&amp;gt; &lt;BR /&gt;&amp;lt;/type&amp;gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I'm trying to create a new node of this type using nodes/{nodeId}/children REST API like so:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;{&lt;BR /&gt; "name":"Daniil Folder 2019",&lt;BR /&gt; "nodeType":"thy:daniilFolder",&lt;BR /&gt; "properties": {&lt;BR /&gt; "thy:folderProp": "Some prop",&lt;BR /&gt; "thy:folderDoc": "...base64-encoded representation of a PDF file..."&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;thy:folderProp gets set correctly, however thy:folderDoc is being set to an empty file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;"thy:folderDoc": {&lt;BR /&gt; "size": 0,&lt;BR /&gt; "locale": "en_US",&lt;BR /&gt; "id": 392,&lt;BR /&gt; "infoUrl": "contentUrl=|mimetype=|size=0|encoding=|locale=en_US_"&lt;BR /&gt;}&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Jan 2019 09:28:07 GMT</pubDate>
    <dc:creator>daniil</dc:creator>
    <dc:date>2019-01-03T09:28:07Z</dc:date>
    <item>
      <title>Set a property of type d:content via REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67704#M22556</link>
      <description>Hi all,How would I create a new node with d:content property via REST API?I created a custom type containing a property of type d:content:&amp;lt;type name="thy:daniilFolder"&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;title&amp;gt;Daniil Folder&amp;lt;/title&amp;gt; &amp;nbsp; &amp;nbsp; &amp;lt;parent&amp;gt;cm:folder&amp;lt;/parent&amp;gt;  &amp;nbsp; &amp;nbsp; &amp;lt;properties&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;p</description>
      <pubDate>Thu, 03 Jan 2019 09:28:07 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67704#M22556</guid>
      <dc:creator>daniil</dc:creator>
      <dc:date>2019-01-03T09:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Set a property of type d:content via REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67705#M22557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As far as I can see from both the API Explorer and the low-level code, the public V1 REST API does not support dealing with any custom d:content properties. Only cm:content is supported (actually hard-coded).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 09:34:22 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67705#M22557</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-01-03T09:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Set a property of type d:content via REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67706#M22558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the info, Axel!&lt;BR /&gt;Looks like I'll have to store base64 representation of a file and mimetype inside a d:any field.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 13:53:52 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67706#M22558</guid>
      <dc:creator>daniil</dc:creator>
      <dc:date>2019-01-03T13:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set a property of type d:content via REST API</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67707#M22559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or you could just use an API that is&amp;nbsp;a bit more suited to the use case, e.g. CMIS via Browser binding, instead of completely messing up the data&amp;nbsp;storage. Any Base64 data in a d:any will be stored as a blob in the database instead of content on disk, and will seriously impact the performance of the DB the more data is being stored in that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Jan 2019 15:01:18 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/set-a-property-of-type-d-content-via-rest-api/m-p/67707#M22559</guid>
      <dc:creator>afaust</dc:creator>
      <dc:date>2019-01-03T15:01:18Z</dc:date>
    </item>
  </channel>
</rss>

