Use of short URL
Currently, in Nuxeo, the permalink to a doc is quite long, making unconvenient to send it by mail. Is there any way to get some kind of tiny URL instead of the default one? If not, would it be difficult to implement it?
Thanks in advance.
If you need that we create a service that generate a tinier URL, there will be a “small” work if you are a good java developer.
First you need to create a Nuxeo Bundle. Nuxeo IDE provide a sample project creation and a one click Operation Creation. Next you need to create an Operation that takes a document as entry and:
- create a tinyURL stored somewhere (repository/docId/view <=> idForTinyURL) and return void but put the tinyURL into the context.
- or if the tiny URL already exists our directly the tinyURL into the context.
Nuxeo IDE provide a way to create an Operation template.
The binding between tinyURL and the document can be stored into a directory for instance.
Then you create a codec into your project - as Nuxeo do for the nxpath and nxdoc - that uses the operation you have created. You can look the codec generation here, I think. And How to call an operation chain here.
You need a little work and some java skills. If you want to contribute it you are welcome. Maybe Nuxeo will work on that, but no customer asked for it. If you really need this feature, you can contact us.
If you click on the permalink you must have a “tiny url” generated… You have something like:
I think we can make better… Maybe you can remove the view_documents part with another codec that will always use the view_documents xhtml as main page.
But I think it can be enough for you… No ?
I forgot to tell that
- nxdoc is needed to activate the specific codec
- default refer to the repository you point, you can define several repositories
- 803…51 is the docID
- view_documents the template to display the document