掲示板

Get URL for DLFileEntry

12年前 に Tom Vleminckx によって更新されました。

Get URL for DLFileEntry

Junior Member 投稿: 39 参加年月日: 11/06/27 最新の投稿
Hello,

Is there an util class or method to generate the URL for a fileentry in de documentlibrary?

Thank you,
thumbnail
12年前 に Ravi Kumar Gupta によって更新されました。

RE: Get URL for DLFileEntry

Liferay Legend 投稿: 1302 参加年月日: 09/06/24 最新の投稿
Check view_file_entry.jsp in tomcat-6.0.29\webapps\ROOT\html\portlet\document_library directory. It has fileUrl variable. See how that is formed.

HTH
thumbnail
12年前 に Sagar A Vyas によって更新されました。

RE: Get URL for DLFileEntry

Liferay Master 投稿: 679 参加年月日: 09/04/17 最新の投稿
Tom Vleminckx:
Hello,

Is there an util class or method to generate the URL for a fileentry in de documentlibrary?

Thank you,

Hi Tom,

Just do as below you will get url of particular DLFileEntry

<a href='<%=themeDisplay.getPortalURL()+"/c/document_library/get_file?uuid="+dlFileEntry.getUuid()+"&groupId="+themeDisplay.getScopeGroupId() %>' >
MyFile </a>

Thanks,
Sagar Vyas
12年前 に Tom Vleminckx によって更新されました。

RE: Get URL for DLFileEntry

Junior Member 投稿: 39 参加年月日: 11/06/27 最新の投稿
Allright,

Thank you both for the quick response.

Tom
thumbnail
12年前 に Roberto Javier によって更新されました。

RE: Get URL for DLFileEntry

New Member 投稿: 5 参加年月日: 12/03/01 最新の投稿
Excellent, thank you very much Sagar ...
thumbnail
12年前 に Sagar A Vyas によって更新されました。

RE: Get URL for DLFileEntry

Liferay Master 投稿: 679 参加年月日: 09/04/17 最新の投稿
Roberto Javier:
Excellent, thank you very much Sagar ...



Glad to know it helps you emoticon
thumbnail
11年前 に me liferay によって更新されました。

RE: Get URL for DLFileEntry

Junior Member 投稿: 25 参加年月日: 11/12/14 最新の投稿
Is there a way to get it in the ModelLisetener class because in that class we do not have themdisplay object reference.
all I have id dlfileEntry reference.
thumbnail
8年前 に Sai Sriharsha Kasturi によって更新されました。

RE: Get URL for DLFileEntry

Junior Member 投稿: 34 参加年月日: 12/10/21 最新の投稿
me liferay:
Is there a way to get it in the ModelLisetener class because in that class we do not have themdisplay object reference.
all I have id dlfileEntry reference.



Try this,

String portalURL = PortalUtil.getPortalURL(company.getVirtualHostname(), PortalUtil.getPortalPort(), false);
String url = portalURL + "/c/document_library/get_file?uuid=" + dlfileEntry.getUuid() + "&amp;groupId=" + dlfileEntry.getGroupId();