cancel
Showing results for 
Search instead for 
Did you mean: 

Content upload script

Jaouher
Champ in-the-making
Champ in-the-making

Hi Alfresco community,

I want to upload some content (folders and files) to Alfresco but I do not want to do it manually, can I write some script to make this task easier and to use it further when I have other content to upload?

1 REPLY 1

abhinavmishra14
World-Class Innovator
World-Class Innovator

You could write a script in any language of your choice to call file-upload rest apis to upload files into alfresco. If you have multiple files in a folder, then you can iterate the directories and upload the files one by one. 

Following APIs can be utilized:

https://docs.alfresco.com/6.1/concepts/dev-api-by-language-alf-rest-upload-file.html

https://docs.alfresco.com/5.0/references/RESTful-UploadUploadPost.html

An example of Upload Post api using java: https://javaworld-abhinav.blogspot.com/2014/09/upload-documents-to-alfresco-using-rest.html 

You can also use CMIS for uploading files, example: https://ecmarchitect.com/archives/2013/08/26/3528

For upload a folder containing multiple files, you can use ftp or webdav.

Java example of ftp based upload can be found here: https://github.com/abhinavmishra14/AlfrescoJMeterLoadTestPlugin/blob/master/src/com/jmeter/alfresco/...

~Abhinav
(ACSCE, AWS SAA, Azure Admin)