Does anyone know how to save file to download. I a...
# multiplatform
o
Does anyone know how to save file to download. I am making a compose multiplatform app with wasm first. I am using filekit libs but it like the new version doesn't have a way to save file. I even tried js implementation but it create the file but it doesn't write the data to a the file. I am trying to save text file.
v
On Js and WASM targets, you can download a text file with FileKit using this method:
Copy code
FileKit.download(
    bytes = "Hello, FileKit!".encodeToByteArray(),
    fileName = "hello.txt"
)
Here is the doc about the download method: https://filekit.mintlify.app/core/file-utils#downloading-files-from-web
👍 1