Closed Minnozz closed 2 years ago
I wounder what the best approach to this one would be since there are many routes we could take and we have now kind of a mixed bag of these approaches.
Personally I think 1 and 2 would be best for this particular binding.
I had to deal with this same issue recently @Minnozz. This is how I solved it:
open Webapi
let blob = ...
let filename = "..."
let objectUrl = Url.createObjectURL(File.make([blob->Blob.blobToBlobPart], filename))
Webapi.Url.createObjectUrl
accepts aWebapi.File.t
. This is a "superclass" ofWebapi.Blob.t
, but becausecreateObjectUrl
is not a method ofFile
, it is not generated forBlob
too.