mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Download file working
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<div *ngIf="msg.attachments" class="message-attachments">
|
||||
<div *ngFor="let file of msg.attachments let i = index">
|
||||
<div (click)="downloadFileMsg(msg)">
|
||||
<img *ngIf="msg.image_url" src="{{msg.image_url}}" alt="image">
|
||||
<img *ngIf="msg.image_url" src={{msg.image_url}} alt="image">
|
||||
</div>
|
||||
<div>
|
||||
<div>
|
||||
|
||||
@@ -591,6 +591,7 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
} else {
|
||||
this.sqlservice.getAllChatMSG(roomId).then((msg: any) => {
|
||||
console.log('ALL MSG DBBB', msg)
|
||||
let chatmsgArray = [];
|
||||
let array = []
|
||||
msg.forEach(element => {
|
||||
@@ -606,7 +607,8 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
rid: element.Rid,
|
||||
ts: element.Ts,
|
||||
u: this.isJson(element.U),
|
||||
_updatedAt: element.UpdatedAt
|
||||
_updatedAt: element.UpdatedAt,
|
||||
image_url: this.isJson(element.image_url)
|
||||
}
|
||||
|
||||
chatmsgArray.push(msgChat)
|
||||
@@ -787,11 +789,12 @@ export class MessagesPage implements OnInit, AfterViewInit, OnDestroy {
|
||||
console.log('SAVED FILE WEB error ', error)
|
||||
});
|
||||
|
||||
const readFile = await Filesystem.readdir({
|
||||
const readFile = await Filesystem.readFile({
|
||||
path: `${IMAGE_DIR}/${name}`,
|
||||
directory: Directory.Data,
|
||||
}).then((foo) => {
|
||||
console.log('GET FILE WEB', foo)
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user