Uploading document with custom properties

cancel
Showing results for 
Search instead for 
Did you mean: 
tpardabe
Active Member

Uploading document with custom properties

Hello, I am a newbie to the Alfresco and I would like to know the difference 2 upload URLs:

* V0 => POST .../alfresco/s/api/upload

* V1 => POST .../alfresco/api/-default-/public/alfresco/versions/1/nodes/{parentid}/children

how they are different? which one is better in terms of performance?

Moreover, for V0, can I set custom properties of my new types and specify custom type? If I can set, then could you provide some examples?

I am currently using Alfresco v 5.2.

3 Replies
abbask01
Senior Member

Re: Uploading document with custom properties

this was discussed in the BeeCon i guess. From newer versions (5+) alfresco will start to deprecate its V0 Rest APIs and create more standardized V1 Rest APIs.

here a PPT than might give you some insights - http://beecon.buzz/2016/assets/data/files/20160401001/Alfresco_REST_API_of_the_future_BeeCon2016.pdf 

see api-explorer for more description on API and examples

Regards,
Abbas
tpardabe
Active Member

Re: Uploading document with custom properties

Currently, upload to Alfresco is developed using V0. If performance-wise they are the same and just first being deprecated, I would like to extend existing V0 upload.

File upload | Alfresco Documentation 

from above link, I assume that {contenttype} field specifies the custom type. But, being able to specify type, I would also like to set custom property values at the time of upload(using v0). I have googled a lot with no success.

abbask01
Senior Member

Re: Uploading document with custom properties

Yes there is a provision for sending content type in the request for upload document. unfortunately that will only apply the content-type on your document node, the properties associated with it will assume its default values. for uploading document with custom properties you will be required to create custom web-scripts that can process your request accordingly. Webscripts this might help you.

Regards,
Abbas