UrlUtil.getFileName先尝试截取

This commit is contained in:
Xwite
2023-03-15 21:42:42 +08:00
parent 5821625aa5
commit 193c0bcc9c

View File

@@ -40,7 +40,7 @@ object UrlUtil {
/**
* 根据网络url获取文件信息 文件名
*/
fun getFileName(fileUrl: String, headerMap: <String, String>? = null): String? {
fun getFileName(fileUrl: String, headerMap: Map<String, String>? = null): String? {
// 如果获取到后缀可直接截取链接
if (getSuffix(fileUrl, "") != "") return fileUrl.substringAfterLast("/")
return kotlin.runCatching {