优化 #5592
This commit is contained in:
@@ -322,7 +322,7 @@ interface JsExtensions : JsEncodeUtils {
|
|||||||
fun downloadFile(url: String): String {
|
fun downloadFile(url: String): String {
|
||||||
rhinoContext.ensureActive()
|
rhinoContext.ensureActive()
|
||||||
val analyzeUrl = AnalyzeUrl(url, source = getSource(), coroutineContext = context)
|
val analyzeUrl = AnalyzeUrl(url, source = getSource(), coroutineContext = context)
|
||||||
val type = UrlUtil.getSuffix(url, analyzeUrl.type)
|
val type = analyzeUrl.type ?: UrlUtil.getSuffix(url)
|
||||||
val path = FileUtils.getPath(
|
val path = FileUtils.getPath(
|
||||||
File(FileUtils.getCachePath()),
|
File(FileUtils.getCachePath()),
|
||||||
"${MD5Utils.md5Encode16(url)}.${type}"
|
"${MD5Utils.md5Encode16(url)}.${type}"
|
||||||
|
|||||||
Reference in New Issue
Block a user