As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hi I am new to alfresco and not sure if I am looking in the right place but I'm not able to find a way to upload a local document to a folder in alfresco using Rest API calls. If you have done so before, I would appreciate the help!
Create a node as child of the folder using the POST /nodes/{nodeId}/children
Update binary content using the PUT /nodes/{nodeId}
Thank you for your response. Could you elaborate more or direct me to any documentation/ post that would help me? Thanks
If you have api explorer installed go to http://<your_alfresco_domain>/api-explorer/#/nodes.
If not, look at public one: https://api-explorer.alfresco.com/api-explorer/
Explorer have a lot of comments and could be easy understandable. The documentation is here: https://docs.alfresco.com/content-services/latest/develop/rest-api-guide/
Long words short: Find nodeID of your folder. Create a document as a child in this folder by POST /nodes/{folder_nodeId}/children. If sucsess you will get json respons with new document (node) id.
Upload the content of this new document by PUT /nodes/{document_nodeId}.
Hi
You can use below Rest api call to upload the file/document to alfresco .
http://<hostname>:<port>/alfresco/api/-default-/public/alfresco/versions/1/nodes/{id}/children
Below Link will explain you about the above Rest api call , its Request Body and its all necessary parameters .
https://docs.alfresco.com/content-services/latest/develop/rest-api-guide/folders-files/#uploadfile
Please refer below snapshot from Postman for uploading content to alfresco .