tarek
01/30/2024, 1:56 PMfun ContentType.Companion.fromFilePath(path: String): List<ContentType>
https://api.ktor.io/ktor-http/io.ktor.http/from-file-path.html
I tried various ways without success,
Ktor_httpContentType.Companion.shared.fromFilePath
Ciaran Sloan
01/30/2024, 3:14 PMKtor_httpContentType.shared.fromFilePath
?Ciaran Sloan
01/30/2024, 3:14 PMmohamed rejeb
01/30/2024, 3:26 PMtarek
01/30/2024, 3:29 PMKtor_httpContentType.companion.parse(value:)
so I don't know what else to do @Ciaran Sloantarek
01/30/2024, 3:30 PMCiaran Sloan
01/30/2024, 3:34 PMparse
because its a declared in the companion object of the class. (See screenshot)Ciaran Sloan
01/30/2024, 3:34 PMCiaran Sloan
01/30/2024, 3:35 PMFileContentTypeKt.ContentType.shared.fromFilePath("")
.
Not entirely sure about this, but I'd imagine this is more the direction you'd need to gomohamed rejeb
01/30/2024, 3:35 PMfun contentTypeFromFilePath(path: String): List<ContentType> = ContentType.fromFilePath(path)
tarek
01/30/2024, 3:35 PMFileContentTypeKt
@Ciaran Sloantarek
01/30/2024, 3:36 PMmohamed rejeb
01/30/2024, 3:37 PMCiaran Sloan
01/30/2024, 3:38 PMtarek
01/30/2024, 3:46 PM