linkForAsset

abstract fun linkForAsset(module: AssetModuleId, overrideType: AssetType? = null): String

Generate a relative link to serve the asset specified by the provided module ID; the link is built from the active configured asset prefix, plus the "asset tag," which is a variable-length cryptographic fingerprint of the asset's content.

If the asset system isn't ready, this method may suspend to wait for a period of time for initialization.

Return

Relative URI calculated to serve the provided asset.

Parameters

module

Asset module ID for which a relative link is needed.

overrideType

Overrides the asset type, which governs the file extension in the generated link.

Throws

If the provided module ID cannot be found in the active asset bundle.