Message Boards
Changing URL for Document or Image uploaded in Liferay
Raghu k, modified 11 Years ago.
Changing URL for Document or Image uploaded in Liferay
Junior Member Posts: 58 Join Date: 8/10/12 Recent Posts
Hi all,
When we create a document or image in liferay, that will generate a URL for it. Whenever we want use that document or image, we have to refer that document.image with that URL. But this URL will have some random values.
Eg : http://localhost:8080/documents/16201/3acfda89-f65c-424c-9ca0-25322abcfdf8
In above link 16201 is my site ID. Value which is present after that is randomly generated value. I have below doubts regarding this.
1. What does this random value indicate? is it some ID kind of thing?
2.Is there any way to change this URL so that we can refer it easily?
3.If it is ID, can we create our own ID in its place just like the way we create custom ID for web content?
Please provide your suggestions. I am using LR 6.1.
When we create a document or image in liferay, that will generate a URL for it. Whenever we want use that document or image, we have to refer that document.image with that URL. But this URL will have some random values.
Eg : http://localhost:8080/documents/16201/3acfda89-f65c-424c-9ca0-25322abcfdf8
In above link 16201 is my site ID. Value which is present after that is randomly generated value. I have below doubts regarding this.
1. What does this random value indicate? is it some ID kind of thing?
2.Is there any way to change this URL so that we can refer it easily?
3.If it is ID, can we create our own ID in its place just like the way we create custom ID for web content?
Please provide your suggestions. I am using LR 6.1.
Raghu k, modified 11 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Junior Member Posts: 58 Join Date: 8/10/12 Recent Posts
I have gone thru below link. But I am not able to understand anything.
http://www.liferay.com/web/connor.mckay/blog/-/blogs/5262286
http://www.liferay.com/web/connor.mckay/blog/-/blogs/5262286
Harish Kumar, modified 11 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Expert Posts: 483 Join Date: 7/31/10 Recent Posts3acfda89-f65c-424c-9ca0-25322abcfdf8
is the uuid and you can find all the such info in dlfileentry table.
Paul ., modified 11 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Liferay Master Posts: 522 Join Date: 8/29/11 Recent PostsRaghu k:
1. What does this random value indicate? is it some ID kind of thing?
It is the uuid_ for this DLFileEntry to uniquely identify it.
Raghu k:
2.Is there any way to change this URL so that we can refer it easily?
Yes, by default you should be able to able to get the file / document from Document library using the friendly routes. However the portlet should be able to understand those routes. Eg. if you use Document Library display portlet you can create friendly url's based on the routes in file document-library-display-friendly-url-routes.xml
Otherwise for your own custom portlet you'll have to create new custom routes and provide the implementation to retrieve the document
Raghu k:
3.If it is ID, can we create our own ID in its place just like the way we create custom ID for web content?
Please provide your suggestions. I am using LR 6.1.
That would be inside the Document Library portlet and you may have to extend the portlet , which is not advisable.
Raghu k, modified 11 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Junior Member Posts: 58 Join Date: 8/10/12 Recent Posts
Harish and Paul,
Thanks for your reply.
Paul,
Can you please provide more information or links on friendly routes(who to write and configure them). I have gone through link which i gave in my 1st post. But I dint understand it. I am totally new to Liferay. Can you please help me out.
Thanks for your reply.
Paul,
Can you please provide more information or links on friendly routes(who to write and configure them). I have gone through link which i gave in my 1st post. But I dint understand it. I am totally new to Liferay. Can you please help me out.
Paul ., modified 11 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Liferay Master Posts: 522 Join Date: 8/29/11 Recent Posts
This was the one I started with https://www.liferay.com/community/wiki/-/wiki/Main/FriendlyURLMapper
Let me know if you have any questions on it.
Let me know if you have any questions on it.
Andre Kreienbring, modified 3 Years ago.
RE: Changing URL for Document or Image uploaded in Liferay
Regular Member Posts: 152 Join Date: 12/18/06 Recent Posts
After 7 years.... Now there is a feature request for this:
https://issues.liferay.com/browse/LPS-95217
https://issues.liferay.com/browse/LPS-95217