File Utils

Methods

# (inner) fetchFile(url, type, onComplete, onError) → {FileReader|Promise|void}

Wrapper to load files (from url using fetch or from file using FileReader)
Parameters:
Name Type Description
url String | File | Blob the url of the file (or the file itself)
type String an string to know how to fetch it: "text","arraybuffer","json","blob"
onComplete function callback(data)
onError function in case of an error
Returns:
returns the object used to
Type
FileReader | Promise | void