This commit is contained in:
Peter Maquiran
2024-03-26 13:58:09 +01:00
3884 changed files with 1963136 additions and 404 deletions
+7 -4
View File
@@ -848,7 +848,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log('ios add file ')
const resultt = await FilePicker.pickFiles({
types: ['application/pdf'],
types: ['application/pdf', 'application/doc', 'application/docx','application/xls', 'application/xlsx', 'application/ppt',
'application/pptx', 'application/txt'],
multiple: false,
readData: true,
});
@@ -856,6 +857,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log('RESULT', resultt.files[0].data)
const blobb = this.fileService.base64toBlob(resultt.files[0].data, resultt.files[0].mimeType)
const blob = new Blob([resultt.files[0].data], {type: resultt.files[0].mimeType});
const formDataa = new FormData();
formDataa.append('blobFile', blobb);
@@ -1109,7 +1111,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
console.log('url while open ',pdfString)
const modal = await this.modalController.create({
/* const modal = await this.modalController.create({
component: ViewDocumentSecondOptionsPage,
componentProps: {
fileUrl: pdfString,
@@ -1119,6 +1121,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
});
await modal.present();
/*
await modal.present(); */
var blob = new Blob([pdfString], { type: 'application/pdf' });
console.log('blob blob', blob)
@@ -1147,7 +1151,6 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
path: fileName,
data: removePre,
directory: Directory.Cache,
encoding: Encoding.UTF8
}).then((dir) => {
console.log('DIR ', dir)
this.fileOpener
@@ -1156,7 +1159,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
.catch(e => console.error(e))
}).catch((error) => {
console.log('error writing the file', error)
}); */
});
}
removeTextBeforeSlash(inputString, controlString) {