Hi,
I need to copy files from folders in Alfresco to an external server. i want to do this with a script in JS.
Anyone have any idea how to set the javascript to make the copy?
Thank you very much for helping
If you want to write JavaScript that will copy files from Alfresco to a file system, you can use the Alfresco JavaScript API and run it using Node. The API is a client-side library that calls the Alfresco Public REST API. If you decide you don't want to use the JavaScript client you can also just call that REST API directly.
The GitHub project for the Alfresco JavaScript API has plenty of documentation and examples.
The Nodes API has a getNodeContent call you can run to get the file.
Hope that helps,
Jeff
Hi:
In addition to the given answers, to copy files to external server or filesystem (without using JS API) I'll take into consideration:
- If you have (very) few documents to download, you can use unload zip action in Share, and then copy files to the external server.
- You can use webdav to mount Alfresco folders and then copy files to the external server.
- You can also use Bulk Export Tool addon in Alfresco:
https://github.com/vprince1/alfresco-bulk-export
- Also, you can use some REST API based artifact like this:
https://github.com/zylklab/alfresco-export-scripts#downloadsitesh
Hope it helps.
--C.
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.