AnsweredAssumed Answered

Problem Downloading File From Alfresco

Question asked by mbarrerag on Jan 9, 2013
Latest reply on Jan 9, 2013 by mbarrerag
Hi everyone,

I know that there is a lot of information on the web about how to download a file using the webservice client, but i couldn't find anything about my problem.

The problem is that i can download a file from the alfresco's repo but the file is always incomplete, i really dont know how to change this. Here's my code:

   public static Content download(String name, Reference folder,
         AuthenticationDetails session) throws NodeAlfrescoException {
      Content content = null;
      try {
         String alfrescoRoot = Utils.appProperties().getProperty("alfresco.url");
         alfrescoRoot += "api";
         Reference ref = new Reference(STORE, null, folder.getPath()
               + "/cm:" + name);
         Content[] read = getContentService().read(
               new Predicate(new Reference[]{ref}, STORE, null),
         content = read[0];
      } catch (Exception e) {
         throw new NodeAlfrescoException();
      return content;
Please any help
Thanks in Advance!!