gbox-sdk
    Preparing search index...

    Function toFile

    • Helper for creating a File to pass to an SDK upload method from a variety of different data formats

      Parameters

      • value: ToFileInput | PromiseLike<ToFileInput>

        the raw content of the file. Can be an Uploadable, BlobLikePart, or AsyncIterable of BlobLikeParts

      • Optionalname: null | string

        the name of the file. If omitted, toFile will try to determine a file name from bits if possible

      • Optionaloptions: FilePropertyBag

        additional properties

        • type

          the MIME type of the content

        • lastModified

          the last modified timestamp

      Returns Promise<File>

      a File with the given properties