掲示板

unique url for document

11年前 に Amit Shukla によって更新されました。

unique url for document

Junior Member 投稿: 93 参加年月日: 12/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
thumbnail
11年前 に Hitesh Methani によって更新されました。

RE: unique url for document

Regular Member 投稿: 171 参加年月日: 10/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.
11年前 に Oliver Bayer によって更新されました。

RE: unique url for document

Liferay Master 投稿: 894 参加年月日: 09/02/18 最新の投稿
Hi Amit,

you can easily create an url for document and media entities like this:
/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
11年前 に Amit Shukla によって更新されました。

RE: unique url for document

Junior Member 投稿: 93 参加年月日: 12/06/07 最新の投稿
Thanks a lot Hitesh and Oliver Bayer.I got my answer
11年前 に Amit Shukla によって更新されました。

RE: unique url for document

Junior Member 投稿: 93 参加年月日: 12/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
11年前 に Oliver Bayer によって更新されました。

RE: unique url for document

Liferay Master 投稿: 894 参加年月日: 09/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
11年前 に Amit Shukla によって更新されました。

RE: unique url for document

Junior Member 投稿: 93 参加年月日: 12/06/07 最新の投稿
thanks a lot oliver

Amit