file.ml1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21open Js_of_ocaml type t = File.file Js.t let name (file: t): string = file##.name |> Js.to_string let media_type (file: t): string option = match file##._type |> Js.to_string with | "" -> None | s -> Some s let size (file: t): int = file##.size