フォーラム

ホーム » Liferay Portal » English » 6. Portal Framework

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Amit Shukla
unique url for document
2012/09/10 22:25
答え

Amit Shukla

ランク: Junior Member

投稿: 92

参加年月日: 2012/06/07

最近の投稿

Hi all,

I need unique URL for document at the time of uploading document.

Can any body help me also the regarding flow? How the docs save in document library.

Thanks

Amit Shukla
Hitesh Methani
RE: unique url for document
2012/09/10 23:57
答え

Hitesh Methani

ランク: Regular Member

投稿: 169

参加年月日: 2010/06/24

最近の投稿

Hello Amit,

If you are talking about generating urls at code level for documents, then you can refer fourth point in the link creating url.

Regarding your second question, docs are stored by default in data/document_library folder.

Thanks and Regards,
Hitesh Methani.
Oliver Bayer
RE: unique url for document
2012/09/11 1:01
答え

Oliver Bayer

ランク: Liferay Master

投稿: 881

参加年月日: 2009/02/18

最近の投稿

Hi Amit,

you can easily create an url for document and media entities like this:
1/documents/{groupId}/{folderId}/httpUtil.encodeURL(htmlUtil.unescape({title}))

I've put the needed parameters in brackets. If you have a dlFileEntry object you can get them from it.
HTH Oli
Amit Shukla
RE: unique url for document
2012/09/13 4:11
答え

Amit Shukla

ランク: Junior Member

投稿: 92

参加年月日: 2012/06/07

最近の投稿

Thanks a lot Hitesh and Oliver Bayer.I got my answer
Amit Shukla
RE: unique url for document
2012/11/15 22:23
答え

Amit Shukla

ランク: Junior Member

投稿: 92

参加年月日: 2012/06/07

最近の投稿

Hi oliver,
I got url of docs by this for my localhost.

String docurl="http://localhost:8080" + "/documents/" + groupId+"/"+folderId+"/"
+HttpUtil.getHttp().encodeURL(HtmlUtil.getHtml().unescape(title));

instead of ----http://localhost:8080" how can i get this in generic manner.

Thanks
Amit
Oliver Bayer
RE: unique url for document
2012/11/16 1:00
答え

Oliver Bayer

ランク: Liferay Master

投稿: 881

参加年月日: 2009/02/18

最近の投稿

Hi Amit,

I think you should be able to use relative urls too (without the http://localhost:8080 prefix). But if you want or have to use an absolute url for some reasons "themeDisplay.getPortalURL()" should do the trick.

Greets Oli
Amit Shukla
RE: unique url for document
2012/11/20 23:13
答え

Amit Shukla

ランク: Junior Member

投稿: 92

参加年月日: 2012/06/07

最近の投稿

thanks a lot oliver

Amit