cancel
Showing results for 
Search instead for 
Did you mean: 

Copy files to external server

YariMarchisone
Champ in-the-making
Champ in-the-making

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

2 REPLIES 2

jpotts
World-Class Innovator
World-Class Innovator

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

cesarista
World-Class Innovator
World-Class Innovator

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.