diff --git a/src/models/request/sendRequest.ts b/src/models/request/sendRequest.ts index 035fe8e03f7..e07804e96a6 100644 --- a/src/models/request/sendRequest.ts +++ b/src/models/request/sendRequest.ts @@ -7,6 +7,7 @@ import { Send } from '../domain/send'; export class SendRequest { type: SendType; + fileLength?: number; name: string; notes: string; key: string; @@ -18,8 +19,9 @@ export class SendRequest { password: string; disabled: boolean; - constructor(send: Send) { + constructor(send: Send, fileLength?: number) { this.type = send.type; + this.fileLength = fileLength; this.name = send.name ? send.name.encryptedString : null; this.notes = send.notes ? send.notes.encryptedString : null; this.maxAccessCount = send.maxAccessCount; diff --git a/src/services/send.service.ts b/src/services/send.service.ts index 27d1cb9ff6f..c589e969811 100644 --- a/src/services/send.service.ts +++ b/src/services/send.service.ts @@ -127,7 +127,7 @@ export class SendService implements SendServiceAbstraction { } async saveWithServer(sendData: [Send, ArrayBuffer]): Promise { - const request = new SendRequest(sendData[0]); + const request = new SendRequest(sendData[0], sendData[1]?.byteLength); let response: SendResponse; if (sendData[0].id == null) { if (sendData[0].type === SendType.Text) {