Basically a couple of (extention) functions on the client side of things:
(instance: File).readAsByteArray() : byte[] so that a File coming from Html.input can be easily turned into binary content that can be sent to the server (upload)
(instance: byte[]).download(filename: string) -> unit for file download once someone has hold of some byte[] returned from the backend, we might need to infer the content type based on the extension of the file.
docs for uploading and downloading files because recently many people have been asking for this
readAsByteArray() might return Async<byte[]> (not sure) but that should be no problem, really
Basically a couple of (extention) functions on the client side of things:
(instance: File).readAsByteArray() : byte[]
so that aFile
coming fromHtml.input
can be easily turned into binary content that can be sent to the server (upload)(instance: byte[]).download(filename: string) -> unit
for file download once someone has hold of somebyte[]
returned from the backend, we might need to infer the content type based on the extension of the file.