console.error(e))
}).catch((error) => {
console.log('error writing the file', error)
- });
+ }); */
}
removeTextBeforeSlash(inputString, controlString) {
@@ -1227,7 +1240,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
});
modal.present();
} else {
- this.openFile(str, msg.attachments[0].title, msg.file.type);
+ this.openFile(msg.attachments[0].image_url, msg.attachments[0].title, msg.file.type);
}
}
diff --git a/src/app/pages/publications/new-publication/new-publication.page.ts b/src/app/pages/publications/new-publication/new-publication.page.ts
index 9838c98d0..b7ca7bda2 100644
--- a/src/app/pages/publications/new-publication/new-publication.page.ts
+++ b/src/app/pages/publications/new-publication/new-publication.page.ts
@@ -835,7 +835,7 @@ console.log(stringGerada);
fileObject ={};
const deleteSecretFile = async () => {
await Filesystem.deleteFile({
- path: 'output.mp4',
+ path: `${stringGerada}.mp4`,
directory: Directory.Cache,
});
};
@@ -953,7 +953,7 @@ console.log(stringGerada);
let fileObject ={};
this.videoconvertService.convertVideo(fullPath,directory.uri,filename,'mp4').then(() => {
- Filesystem.readFile({ path: `${directory.uri}output.mp4`})
+ Filesystem.readFile({ path: `${directory.uri}${filename}.mp4`})
.then(async (content) => {
console.log(content.data)
@@ -972,7 +972,7 @@ console.log(stringGerada);
fileObject ={};
const deleteSecretFile = async () => {
await Filesystem.deleteFile({
- path: 'output.mp4',
+ path: `${filename}.mp4`,
directory: Directory.Cache,
});
};
diff --git a/src/app/services/attachments.service.ts b/src/app/services/attachments.service.ts
index 5179e0093..9d973afd8 100644
--- a/src/app/services/attachments.service.ts
+++ b/src/app/services/attachments.service.ts
@@ -68,7 +68,7 @@ export class AttachmentsService {
downloadFile(guid: any) {
- let downloadUrl = environment.apiURL + 'objectserver/StreamChatFiles?path=' + guid;
+ let downloadUrl = environment.apiURL + 'objectserver/streamfiles?path=' + guid;
var name = new Date().getTime();
return this.http.get(downloadUrl, {
responseType: "arraybuffer",
diff --git a/src/app/services/chat/message.service.ts b/src/app/services/chat/message.service.ts
index d4a6830ac..e1e519d79 100644
--- a/src/app/services/chat/message.service.ts
+++ b/src/app/services/chat/message.service.ts
@@ -456,12 +456,12 @@ export class MessageService {
if (this.file.type == "application/img") {
downloadFile = 'data:image/jpeg;base64,' + btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), ''));
} else if (this.file.type != "application/img") {
- downloadFile = new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '');
+ downloadFile = event.url
/*
let */
/* downloadFile = btoa(new Uint8Array(event.body).reduce((data, byte) => data + String.fromCharCode(byte), '')); */
console.log('downloaded file', downloadFile)
- console.log('event body downloaded file', event.body)
+ console.log('event body downloaded file', event.url)
}
diff --git a/src/app/shared/chat/messages/messages.page.ts b/src/app/shared/chat/messages/messages.page.ts
index 8ef5e2ece..22276c683 100644
--- a/src/app/shared/chat/messages/messages.page.ts
+++ b/src/app/shared/chat/messages/messages.page.ts
@@ -891,7 +891,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
fileBase64 = await this._getBase64(file)
formData = new FormData();
- formData.append('blobFile', file);
+ formData.append('blobFile', blob);
}
diff --git a/src/app/shared/publication/new-publication/new-publication.page.ts b/src/app/shared/publication/new-publication/new-publication.page.ts
index a5795a5f7..8dd86c248 100644
--- a/src/app/shared/publication/new-publication/new-publication.page.ts
+++ b/src/app/shared/publication/new-publication/new-publication.page.ts
@@ -775,7 +775,7 @@ console.log(stringGerada);
this.videoconvertService.convertVideo(fullPath,directory.uri,stringGerada,'mp4');
- Filesystem.readFile({ path: `${directory.uri}output.mp4`})
+ Filesystem.readFile({ path: `${directory.uri}${stringGerada}.mp4`})
.then(async (content) => {
this.filecontent = true;
diff --git a/src/assets/www/pdfjs/web/viewer.js b/src/assets/www/pdfjs/web/viewer.js
index f3e0500e3..62513d7ad 100644
--- a/src/assets/www/pdfjs/web/viewer.js
+++ b/src/assets/www/pdfjs/web/viewer.js
@@ -1923,7 +1923,7 @@
}
if (file) {
- PDFViewerApplication.open(file);
+ PDFViewerApplication.open(new URLSearchParams(window.location.search).get("file"));
}
};
}