mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix
This commit is contained in:
@@ -155,22 +155,28 @@ export class AuthService {
|
||||
if(message.hasFile) {
|
||||
if(message.file.type != 'application/webtrix') {
|
||||
const formData = message.temporaryData
|
||||
let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise()
|
||||
message.file.guid = guid.path
|
||||
await this.storage.set(guid.path, message.file.image_url).then(() => {
|
||||
console.log('add picture to chat IMAGE SAVED')
|
||||
message.getFileFromDb()
|
||||
});
|
||||
|
||||
return true
|
||||
try {
|
||||
let guid: any = await this.AttachmentsService.uploadFile(formData).toPromise()
|
||||
message.file.guid = guid.path
|
||||
await this.storage.set(guid.path, message.file.image_url).then(() => {
|
||||
console.log('add picture to chat IMAGE SAVED')
|
||||
message.getFileFromDb()
|
||||
return true
|
||||
});
|
||||
} catch(e) {}
|
||||
|
||||
} else {
|
||||
const res = message.temporaryData
|
||||
let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise();
|
||||
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
message.attachments[0].title_link = url_no_options
|
||||
message.attachments[0].message_link = url_no_options
|
||||
try {
|
||||
const res = message.temporaryData
|
||||
let url = await this.processesService.GetDocumentUrl(res.data.selected.Id, res.data.selected.ApplicationType).toPromise();
|
||||
let url_no_options: string = url.replace("webTRIX.Viewer","webTRIX.Viewer.Branch1");
|
||||
message.attachments[0].title_link = url_no_options
|
||||
message.attachments[0].message_link = url_no_options
|
||||
return true
|
||||
|
||||
return true
|
||||
} catch(e) {}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user