Legacy Knowledge Base
Published Jul. 2, 2025

Is it feasible to shorten the document's URL to its name?

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • The URL which is generated for Documents that are uploaded to the Documents and Media portlet contains a string of numbers, letters, and a 't' parameter after the name of the document. If there is any way to get rid of that string and parameter so that the URL ends with just the document name.
  • Steps to reproduce
    1) Start a clean instance of Liferay DXP 7.2 with fix pack 5.
    2) Go to Content & Data -> Documents and Media, and upload a pdf file.
    3) Select the file uploaded and go to its information -> Latest Version URL
    Expected Result: The last section in the URL for the document is just the document name (i.e. /Document-Name.pdf)
    /documents/544310/552443/KED-Report-Feed+Inflation-Dec2020.pdf
    Actual Result: The end of the URL contains some additional information, including a string of letters and numbers and a 't' parameter. 
    /documents/544310/552443/KED-Report-Feed+Inflation-Dec2020.pdf/de057edb-a991-081f-bc29-bead63e7aacd?t=1607548870902

Environment

  • Liferay DXP 7.2 Fix Pack 5

Resolution

  • This is the intended behavior of the Liferay DXP as there is the purpose behind every parameter of the URL.
  • Let's say this URL has been encountered: http://localhost:8080/documents/20124/0/pdf.pdf/4032f01f-bf0e-0406-53f3-a6b6ed65d95d?t=1610662152807
    Which can be divided into arguments
    http://localhost:8080/assetType/groupId/folderId/fileName/UUID?t=token
    From this point, the document's required information can be seen.
    assetType
    groupId
    UUID
    t (Timestamp argument)

Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base