Download file from lake fs in progress

This commit is contained in:
Eudes Inácio
2021-12-17 17:20:43 +01:00
parent 5ca488e085
commit c10a69fc53
6 changed files with 85 additions and 19 deletions
+17 -1
View File
@@ -279,7 +279,7 @@ export class SqliteService {
public addChatMSG(data) {
console.log('INSIDE DB CHAT MSG',data,)
this.dbInstance.executeSql(`
INSERT OR REPLACE INTO ${this.chatmsg} (Id,Attachments,Channels,File,Mentions,Msg,Rid, Ts ,U, UpdatedAt,image_url)
INSERT OR IGNORE INTO ${this.chatmsg} (Id,Attachments,Channels,File,Mentions,Msg,Rid, Ts ,U, UpdatedAt,image_url)
VALUES ('${data._id}','${JSON.stringify(data.attachments)}','${JSON.stringify(data.channels)}','${JSON.stringify(data.file)}','${JSON.stringify(data.mentions)}','${data.msg}','${data.rid}','${data.ts}','${JSON.stringify(data.u)}','${data._updatedAt}','${JSON.stringify(data.image_url)}')`, [])
.then(() => {
console.log("chat msg add with Success");
@@ -319,6 +319,22 @@ export class SqliteService {
}
//updateChatMsg
public updateChatMsg(id, data) {
try {
console.log("update action data", data)
this.dbInstance.executeSql(`
UPDATE ${this.chatmsg} SET image_url = ? WHERE Id = ${id}`, [data])
.then(() => {
console.log("ChatMsg update with Success");
}, (e) => {
console.log(JSON.stringify(e.err));
});
} catch(error) {}
}
//updateprocess
public updateProcess(data) {