elm.web.utilities.compute_fn_from_url

compute_fn_from_url(url, make_unique=False)[source]

Compute a unique file name from URL string.

File name will always be 128 characters or less, unless the make_unique argument is set to true. In that case, the max length is 164 (a UUID is tagged onto the filename).

Parameters:
  • url (str) – Input URL to convert into filename.

  • make_unique (bool, optional) – Option to add a UUID at the end of the file name to make it unique. By default, False.

Returns:

str – Valid filename representation of the URL.