https://kotlinlang.org logo
#compose-desktop
Title
# compose-desktop
t

tz311

03/29/2024, 1:51 PM
Hello everyone, is there a way to download from URLs using Compose Desktop? I have Firebase storage files that I want to download by showing a file explorer shell to the user to allow them to save it. I want to hide the URL of the file from Firebase.
a

Alexander Maryanovsky

03/29/2024, 3:33 PM
It’s not in the scope of Compose, but because Compose for Desktop is based on Java, you have all the Java APIs available.
t

tz311

03/29/2024, 3:36 PM
Thank you
s

sciack

03/29/2024, 4:19 PM
Or if you want to open in a browser you can use:
Copy code
val localUrl = LocalUriHandler.current
localUrl.openUri(url)
And should open the browser in a system independent way
👍 1
m

Michael Paus

03/29/2024, 6:14 PM
And by using Ktor client (https://ktor.io/docs/getting-started-ktor-client.html) this could even be done in a multi-platform fashion.
4 Views