change image qdn service and max img size

This commit is contained in:
Phillip Lang Martinez 2022-11-30 18:29:36 +02:00
parent d22a4abdcc
commit a4af679bdc
2 changed files with 6 additions and 5 deletions

View File

@ -485,7 +485,7 @@
"cchange23": "Cannot Decrypt Message!",
"cchange24": "Maximum Characters per message is 255",
"cchange25": "Edit Message",
"cchange26": "File size exceeds 5 MB",
"cchange26": "File size exceeds 0.5 MB",
"cchange27": "A registered name is required to send images",
"cchange28": "This file is not an image",
"cchange29": "Maximum message size is 1000 bytes",

View File

@ -1397,6 +1397,7 @@ class ChatPage extends LitElement {
const file = new File([result], "name", {
type: 'image/png'
});
compressedFile = file;
resolve();
},
@ -1409,7 +1410,7 @@ class ChatPage extends LitElement {
await publishData({
registeredName: userName,
file : compressedFile,
service: 'IMAGE',
service: 'QCHAT_IMAGE',
identifier: identifier,
parentEpml,
metaData: undefined,
@ -1480,7 +1481,7 @@ class ChatPage extends LitElement {
})
})
const fileSize = compressedFile.size;
if (fileSize > 5000000) {
if (fileSize > 500000) {
parentEpml.request('showSnackBar', get("chatpage.cchange26"));
this.isLoading = false;
this.chatEditor.enable();
@ -1492,7 +1493,7 @@ class ChatPage extends LitElement {
await publishData({
registeredName: userName,
file : compressedFile,
service: 'IMAGE',
service: 'QCHAT_IMAGE',
identifier : identifier,
parentEpml,
metaData: undefined,
@ -1516,7 +1517,7 @@ class ChatPage extends LitElement {
const messageObject = {
messageText: trimmedMessageWithImage,
images: [{
service: "IMAGE",
service: "QCHAT_IMAGE",
name: userName,
identifier: identifier
}],