cancel
Showing results for 
Search instead for 
Did you mean: 

How can I use CMIS to download a file out of the Repository?

seanlon11
Champ in-the-making
Champ in-the-making
I have an application that has a bunch of links to documents that are just sitting out on a server.  The user clicks these links and downloads the desired file to their machine.  We want to put these documents inside of Alfresco, so we can version the documents in a more graceful fashion.

So the updated version would be when a user clicks on the link in the application, the document is downloaded from Alfresco's Repository.

Is this possible?  Is CMIS the best way to accomplish this functionality, or is there a better way?

Thanks,
     Sean
6 REPLIES 6

_sax
Champ in-the-making
Champ in-the-making
The best way to let users download depends on your user interface. Is it a browser or should it be Windows Explorer?
And do these documents often change in their number or place inside Alfresco (that should read: is a manual linking practical or too time-consuming and thus should the download 'place' render itself dynamically)?

seanlon11
Champ in-the-making
Champ in-the-making
Currently, the user interface is a web page with a bunch of links to the documents.  These links go to a static location on a file server.  (http://fileServer:8080/proposals/clientA/estimatedHoursOfCompletion.doc)

I am not familiar enough with Alfresco, but our intention is to leave the files in the same location.  From that location, users can update the file version as needed, but the file will never completely move locations.

Again, I am a novice to Alfresco, so no design is set in stone, and I am open to suggestions.

seanlon11
Champ in-the-making
Champ in-the-making
is the checkOut() method a valid option?

This functionality is for reading purposes ONLY.  So would the checkout() method allow me to stream the file (e.g. PDF) to the user for them to view it?

_sax
Champ in-the-making
Champ in-the-making
With a checkout, you would create a working copy, that is not referenced by your static link. That permanently gets you to the "released"  version. If someone checks in the working copy, a new version (2.0, 3.0, 4.0) is created (if your content is versioned) and the link then gets the user to this new version.
For streaming anything from the repository a static link therefore is sufficient. You only have to use the more cryptic version you get from the details page of any document (right click on the download-link and copy url, the appropriate link here is at the bottom of the screen http://www.techbits.de/wp-content/uploads/2007/03/alfresco_freemind_4.png). This links stays the same, even when you move the content to another folder, something a normal fileserver link wouldn't do.

If you opt for a WebScript, you can display fancy information details about the documents (author, version, whatever-your-company-does-details) besides the file list (that can consist of a search result, i.e. "every document categorized as our-product", or "everything Word from 2011". If you just need a file list, your webpage is the most (time-)efficient variant.

thestorm
Champ in-the-making
Champ in-the-making
How you handle the user authorization when passing that download link, since CMIS can't retrieve me a ticket. I have kinda similar problem, trying to offer the user the download links to all CMIS Query results without passing the content stream of each to my app first.

_sax
Champ in-the-making
Champ in-the-making
I personally didn't use CMIS to date, so I'm not knowing enough to help out with this.
But a WebScript would offer similar functionality and it could be run as a user. And you can use SSO for it.
http://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Description_Options