Nacho Ruiz Martin
11/08/2023, 4:05 PMandroid.net.Uri
and file:// NSUrl
)
I know Kamel but it doesn't support local files.Joel Denke
11/08/2023, 4:06 PMNacho Ruiz Martin
11/09/2023, 8:48 AMJoel Denke
11/09/2023, 8:53 AMNacho Ruiz Martin
11/09/2023, 8:57 AMJoel Denke
11/09/2023, 8:59 AMNacho Ruiz Martin
11/09/2023, 9:00 AMJoel Denke
11/09/2023, 10:43 AMNacho Ruiz Martin
11/09/2023, 10:47 AMJoel Denke
11/09/2023, 11:29 AMNacho Ruiz Martin
11/10/2023, 8:18 AMLuca
11/12/2023, 4:53 AM// File (JVM, Native)
asyncPainterResource(data = File("/path/to/image.png"))
android.net.Uri
is different. See https://github.com/Kamel-Media/Kamel/issues/62
for NSUrl
wrap it in URL
. https://github.com/Kamel-Media/Kamel/blob/c83ef4ae6ad05bd58a00a51352bda7068057cd02[…]kamel-core/src/appleMain/kotlin/io/kamel/core/utils/Platform.kt
If it’s not working feel free to create an issueNacho Ruiz Martin
11/12/2023, 8:56 AMfile://
NSURLs on iOS or content://
android.net.Uri
on Android.
I saw 62 and I will study the possibility to contribute to the library by adding support for them. I don’t have spare time now but as soon as I find some I’ll make a proposal 👍 .Luca
11/12/2023, 5:46 PMNSURL
will only resolve remote urls based on how I implemented it. Can you get a path from the NSURL
? if so you can just use File("/path/to/image.png")
as I was saying.Mapper<NSURL, Url>
and Mapper<NSURL, File>
implementationsNacho Ruiz Martin
11/12/2023, 5:49 PMLuca
11/12/2023, 5:49 PMNacho Ruiz Martin
11/12/2023, 5:50 PMLuca
11/12/2023, 5:52 PMNacho Ruiz Martin
11/12/2023, 6:05 PMLuca
11/12/2023, 6:08 PMNacho Ruiz Martin
11/12/2023, 6:16 PM//Mapper.kt
...
public fun map(input: I): O?
nullable approach or the
public val I.isSupported: Boolean
new property approach (that would require to update all mappers)?Luca
11/12/2023, 6:28 PMNacho Ruiz Martin
11/12/2023, 6:36 PM