Merge branch 'develop' into bugfix/posts-count

This commit is contained in:
usbharu 2024-02-24 15:59:01 +09:00 committed by GitHub
commit fa00116767
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class KtorResourceResolveService(
protected suspend fun runResolve(url: String): ResolveResponse {
val httpResponse = httpClient.get(url)
val contentLength = httpResponse.contentLength()
if ((contentLength ?: sizeLimit) >= sizeLimit) {
if ((contentLength ?: 0) >= sizeLimit) {
throw RemoteMediaFileSizeException("File size is too large. $contentLength >= $sizeLimit")
}
return KtorResolveResponse(httpResponse)