<?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 How to upload document with custom property in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92535#M27425</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using Rest API to upload a document i.e POST /nodes/{nodeid}. My question here is how to set a custom property with a document that is defined under the content model.&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jun 2020 08:42:13 GMT</pubDate>
    <dc:creator>MOH_MCT</dc:creator>
    <dc:date>2020-06-18T08:42:13Z</dc:date>
    <item>
      <title>How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92535#M27425</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using Rest API to upload a document i.e POST /nodes/{nodeid}. My question here is how to set a custom property with a document that is defined under the content model.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 08:42:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92535#M27425</guid>
      <dc:creator>MOH_MCT</dc:creator>
      <dc:date>2020-06-18T08:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92536#M27426</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81283"&gt;@MOH_MCT&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;If you have a custom model, I believe you can reference your custom model like so:&amp;nbsp;&lt;/P&gt;
&lt;PRE class="pre codeblock prettyprint prettyprinted"&gt;&lt;SPAN class="str"&gt;"nodeType=acme:document"&lt;/SPAN&gt; &lt;/PRE&gt;
&lt;P&gt;You can see the documentation &lt;A href="https://docs.alfresco.com/6.1/concepts/dev-api-by-language-alf-rest-upload-file-custom-type.html" target="_self" rel="nofollow noopener noreferrer"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;To add/update custom properties you would add something like this:&lt;/P&gt;
&lt;PRE class="pre codeblock prettyprint prettyprinted"&gt;&lt;SPAN class="str"&gt;"properties"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="pun"&gt;{&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"cm:title"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"My text"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"acme:securityClassification"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"Public"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"cm:versionType"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"MAJOR"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"acme:documentId"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"DOC001"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"cm:versionLabel"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"1.0"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;
      &lt;SPAN class="str"&gt;"cm:description"&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;:&lt;/SPAN&gt; &lt;SPAN class="str"&gt;"My custom text document description"&lt;/SPAN&gt;
    &lt;SPAN class="pun"&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;In the example above you can see that the "acme" content model has a "documentId" custom property/metadata.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 12:26:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92536#M27426</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-06-18T12:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92537#M27427</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/76783"&gt;@EddieMay&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;With POST call /node/nodeid i am unable to add custom property.&lt;/P&gt;&lt;P&gt;For that i am invoking two rest calls one post is for upload and second put call for adding custom property.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 12:02:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92537#M27427</guid>
      <dc:creator>MOH_MCT</dc:creator>
      <dc:date>2020-06-25T12:02:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92538#M27428</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Any update?&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 04:52:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92538#M27428</guid>
      <dc:creator>MOH_MCT</dc:creator>
      <dc:date>2020-06-26T04:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92539#M27429</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81283"&gt;@MOH_MCT&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;I've just run some tests using Postman on the latest Community Edition (201911 GA). What I've done is create a custom model (following the standard examples at&amp;nbsp;&lt;A href="https://docs.alfresco.com/6.2/concepts/admintools-cmm-tutorial.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/6.2/concepts/admintools-cmm-tutorial.html&lt;/A&gt;). So, my custom model is dc:Whitepaper, with a custom property type "dc:writer".&lt;/P&gt;
&lt;P&gt;The ReST API code to upload a new file of type dc:Whitepaper is as follows:&lt;/P&gt;
&lt;PRE&gt;POST /alfresco/api/-default-/public/alfresco/versions/1/nodes/-my-/children?autoRename=true&amp;amp;alf_ticket=TICKET_81eec01da4c0a37a4a746f5554bb8af7f4f0b1a4 HTTP/1.1
Host: localhost:80
Authorization: Basic dGVzdDp0ZXN0
Content-Type: application/json
Content-Type: text/plain

{
	"name": "content-to-be-deleted3.txt",
	"nodeType": "dc:Whitepaper",
	 "properties": {
            "dc:writer": "Eddie"
           
        }
	
}&lt;/PRE&gt;
&lt;P&gt;The file has been uploaded and the type &amp;amp; properties set accordingly.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Writer property set" style="width: 217px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/699iA31A46C71E6D4EE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Writer property set&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;HTH,&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jun 2020 15:40:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92539#M27429</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-06-26T15:40:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92540#M27430</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/76783"&gt;@EddieMay&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We followed the same steps to create a custom model as per document the same payload but still, we are not able to set property.&lt;/P&gt;&lt;P&gt;URI-/alfresco/api/-default-/public/alfresco/versions/1/nodes/708502be-96ff-46c2-95e9-9d07676189c4/children&lt;/P&gt;&lt;P&gt;Payload used-{&lt;BR /&gt;"nodeType": "dc:whitePaper",&lt;BR /&gt;"properties": {&lt;BR /&gt;"dc:writer": "Eddie"&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;After uploading property not reflected. Can you please check?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 09:48:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92540#M27430</guid>
      <dc:creator>MOH_MCT</dc:creator>
      <dc:date>2020-07-01T09:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92541#M27431</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81283"&gt;@MOH_MCT&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Can you look up the model and its properties using the Node Browser? This should display the type &amp;amp; properties in case anything is not being displayed properly in Share.&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Node Browser view" style="width: 610px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/708iA532C6BDEF560FDB/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Node Browser view&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 12:01:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92541#M27431</guid>
      <dc:creator>EddieMay</dc:creator>
      <dc:date>2020-07-01T12:01:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92542#M27432</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/76783"&gt;@EddieMay&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching screenshots for input and output. As even call is successful property is not getting reflected in POST call.&lt;/P&gt;&lt;P&gt;If we trigger the same document based on node id with PUT call property is getting reflected here we are giving the same JSON.&lt;/P&gt;&lt;P&gt;Also attaching a screenshot for file displaying property after POST call.&lt;/P&gt;&lt;P&gt;Please let me know if we can connect our Webex?&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfrescoInput.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/703i8DB2470EABDB8511/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfrescoOutput.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/702iE7F15BD76117D837/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="FilePropertyDisplay.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image"&gt;&lt;img src="https://connect.hyland.com/t5/image/serverpage/image-id/705iF544C096F3C131DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="image" alt="image" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2020 14:36:50 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92542#M27432</guid>
      <dc:creator>MOH_MCT</dc:creator>
      <dc:date>2020-07-01T14:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to upload document with custom property</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92543#M27433</link>
      <description>&lt;P&gt;hello &lt;A href="https://migration33.stage.lithium.com/t5/user/viewprofilepage/user-id/81283"&gt;@MOH_MCT&lt;/A&gt;, have you solved this problem?&lt;/P&gt;&lt;P&gt;Pleas let my know your solution.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Sep 2023 13:13:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/how-to-upload-document-with-custom-property/m-p/92543#M27433</guid>
      <dc:creator>andrakula</dc:creator>
      <dc:date>2023-09-06T13:13:39Z</dc:date>
    </item>
  </channel>
</rss>

