@lion/ui
Version:
A package of extendable web components
55 lines • 1.51 kB
TypeScript
/**
* @typedef {import('../types/input-file.js').SystemFile} SystemFile
*/
/**
* 500MB in bytes
*/
export const MAX_FILE_SIZE: 524288000;
export namespace FILE_FAILED_PROP {
const type: string;
const size: string;
}
export namespace UPLOAD_FILE_STATUS {
const fail: string;
const pass: string;
}
export class FileHandle {
/**
* @param {SystemFile} systemFile
* @param {{ allowedFileTypes: Array<string>; allowedFileExtensions: Array<string>; maxFileSize: number; }} _acceptCriteria
*/
constructor(systemFile: SystemFile, _acceptCriteria: {
allowedFileTypes: Array<string>;
allowedFileExtensions: Array<string>;
maxFileSize: number;
});
/**
* @type {Array<string>}
*/
failedProp: Array<string>;
systemFile: import("../types/input-file.js").SystemFile;
_acceptCriteria: {
allowedFileTypes: Array<string>;
allowedFileExtensions: Array<string>;
maxFileSize: number;
};
/**
* @param {string} fileName
* @return {string}
* @protected
*/
protected _getFileNameExtension(fileName: string): string;
uploadFileStatus(): void;
status: string | undefined;
/**
* @param {SystemFile} file
*/
createDownloadUrl(file: SystemFile): void;
downloadUrl: string | undefined;
}
export type SystemFile = import('../types/input-file.js').SystemFile;
export type property = {
type: string;
size: string;
};
//# sourceMappingURL=FileHandle.d.ts.map