Jorge Castillo
11/22/2022, 2:03 PMFileInput
seems to return a fake path when running a Kotlin web app using Compose for Web locally. What would be the way to go to get a real path and be able to render the image selected, for example? The fakepath is obviously not valid when used on an Img
Oleksandr Karpovich [JB]
11/22/2022, 2:13 PMJorge Castillo
11/22/2022, 2:14 PMJorge Castillo
11/22/2022, 2:15 PMC:\fakepath\sample small.png
as the path for an image called sample small.png
. The window-ish fakepath is added by the browser, or ComposeOleksandr Karpovich [JB]
11/22/2022, 2:17 PMURL.createObjectURL()
can help convert the fake path into string reference for your fileJorge Castillo
11/22/2022, 2:17 PMJorge Castillo
11/22/2022, 2:19 PM