08-18-2020 09:24 AM
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
08-21-2020 12:23 PM
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
08-22-2020 04:53 PM
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.
Explore our Alfresco products with the links below. Use labels to filter content by product module.