3 Replies Latest reply on Jul 12, 2010 10:11 AM by camiloperic

    Problems with downloading files from JCR - with Source Code

    camiloperic

      Hi everyone,

      Lately I've been working on a project for storing files on JCR, and of course getting the files back from it.

      I've found that there is an API for making downloads from JCR through GateIn, the exo.portal.component.web-3.0.0-GA.jar.

      But I have a problem that is, when I just upload a file automatically the program saves the file on the repository an generates a link to download it, and the download does not work, even if I try to remove the file, that is not possible. But if 'ant restart' the project, I can download the files and delete it too. If I close the session responsible for the repository, even doing that before the files are saved with the method .save(), the changes are not persisted to the repository. I'll put some of the code here... can anyone help me??

       

      The relevant files are:

      home.xhtml >> The view

      JcrBean.java >> Responsible for generating the rich:tree for the view, for upload the files and manage the repository

      ContentManager.java >> With a node, considered the root for the files I'll be saving, this class manages clients, categories and files

      NodeManager.java >> Some basic functions like getNode, removeNode, addNode, used in the ContentManager.java

      RepositoryConnector.java >> Returns a session for working with the repository

       

      What can I do to solve this problem?