Skip to content

FileInfo

interface FileInfo {
file: File;
content: string;
filename: string;
type: string;
wb?: any;
json?: any;
csv?: any;
category?: string;
[key: string]: any;
}

The File-object uploaded by the user.

A shortcut to File.name.

A shortcut to filename.toLowerCase().

Most likely a string representation of the file if possible. Shortcut to FileReader.result.

One of the values (based on the file extension):

ExcelImport
CsvImport
JsonImport

If category is ExcelImport this object is a XLSX.WorkBook.

If category is CsvImport this object is a Papa Parse Result Object.

If category is JsonImport this object is a simple JavaScript object representing the JSON content of the file.