fileOpen(args) {
let fileName: string = args.fileDetails.name;
let filePath: string = args.fileDetails.filterPath.replace(/\\/g, "/") + fileName;
let fileType: string = args.fileDetails.type;
if (fileType == ".docx" || fileType == ".txt" || fileType == ".html" || fileType == ".rtf" || fileType == ".xml") {
this.showDocViewer(fileName);
this.getFileStream(filePath, false)
}
else if (fileType == ".pdf") {
this.showPDFViewer(fileName);
this.getFileStream(filePath, true);
}
else if (fileType == ".xlsx") {
this.showExcelViewer(fileName);
this.getBlob(fileName, filePath)
}
} |