03-03-2023 12:21 PM
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!
03-04-2023 06:05 AM
Create a node as child of the folder using the POST /nodes/{nodeId}/children
Update binary content using the PUT /nodes/{nodeId}
03-05-2023 07:22 PM
Thank you for your response. Could you elaborate more or direct me to any documentation/ post that would help me? Thanks
03-10-2023 12:50 PM
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}.
03-14-2023 03:23 AM
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 .
Explore our Alfresco products with the links below. Use labels to filter content by product module.