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?
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/...
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.