fromFileName

fun fromFileName(folder: String? = null, fileName: String): AdResult<AssetPath>

Creates an AssetPath from the passed folder and file names.

When using this method, you should pay attention to the name of your file. For example, the ‘/’ character is not valid when creating a file name. If your filename contains this character, this method will try to interpolate it as an URL and use the MD5 hash as the filename. Otherwise, you will receive an AdError.InvalidAssetName error.

Return

Created AssetPath or an AdError.InvalidAssetName error if the file name is invalid.

Parameters

folder

The name of the folder that will be used as a subdirectory; null by default.

fileName

The name of the advertising resource.