Although byte[] -> Async<byte[]> gets the job done, it is not ideal because it means data is allocated in memory. Supporting Stream makes more sense for file uploads and downloads:
Stream -> Async<'T> for upload
'T -> Async<Stream> for download
Fable doesn't support Stream but I think we can work around that using extension methods like the ones we have for byte[].
TypeInfo from SimpleJson needs to be extended so that it knows how to work with Stream
Although
byte[] -> Async<byte[]>
gets the job done, it is not ideal because it means data is allocated in memory. SupportingStream
makes more sense for file uploads and downloads:Stream -> Async<'T>
for upload'T -> Async<Stream>
for downloadFable doesn't support
Stream
but I think we can work around that using extension methods like the ones we have forbyte[]
.TypeInfo
from SimpleJson needs to be extended so that it knows how to work withStream