cancel
Showing results for 
Search instead for 
Did you mean: 

FTP upload does not trigger import-ACP rule

luminary_mj
Champ in-the-making
Champ in-the-making
Hi,

We are trying to import content to Enterprise 3.1 by uploading ACP files to a space with the "Import an Alfresco content package" rule applied.

We have a standalone Java app that creates ACPs and places them in the import space via FTP, as per  http://wiki.alfresco.com/wiki/Export_and_Import#Import_Action.

The ACP is successfully uploaded, but it does not appear to trigger the import rule. We've tried active and passive mode. There's nothing in the error logs and setting the rule to run in the background makes no difference.

If the ACP is uploaded to the space via the Web Client interface, the rule is triggered and it is imported without any problems. However, due to the 4GB limit of the Zip format, we will have a large number of ACPs and would much rather automate this process.

It appears this issue was raised in JIRA over a year ago but was closed despite not being fixed https://issues.alfresco.com/jira/browse/AR-2240.

Any suggestions would be appreciated.

Thanks,
Mark
1 REPLY 1

luminary_mj
Champ in-the-making
Champ in-the-making
Apologies, turns out this was an error in my FTP code.

For info, I'm using the org.apache.commons.net.ftp library (http://commons.apache.org/net/) to implement FTP functionality. The FtpClient class uses ASCII encoding by default - clearly not suitable for Zip files!

The fix is to add the following line before calling the storeFile method:

ftpClient.setFileType( FTP.BINARY_FILE_TYPE );
All works fine now, happy days.

Mark.