diff --git a/src/abstractions/api.service.ts b/src/abstractions/api.service.ts index 633442c4cb..914afce6b0 100644 --- a/src/abstractions/api.service.ts +++ b/src/abstractions/api.service.ts @@ -193,7 +193,7 @@ export abstract class ApiService { putSendRemovePassword: (id: string) => Promise; deleteSend: (id: string) => Promise; getSendFileDownloadData: (send: SendAccessView, request: SendAccessRequest) => Promise; - renewFileUploadUrl: (sendId: string, fileId: string) => Promise; + renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise; getCipher: (id: string) => Promise; getCipherAdmin: (id: string) => Promise; diff --git a/src/services/api.service.ts b/src/services/api.service.ts index 0f0f5d63fe..dc72e3f1f1 100644 --- a/src/services/api.service.ts +++ b/src/services/api.service.ts @@ -443,8 +443,8 @@ export class ApiService implements ApiServiceAbstraction { return new SendFileUploadDataResponse(r); } - async renewFileUploadUrl(sendId: string, fileId: string): Promise { - const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId + '/renew', null, true, true); + async renewSendFileUploadUrl(sendId: string, fileId: string): Promise { + const r = await this.send('GET', '/sends/' + sendId + '/file/' + fileId, null, true, true); return new SendFileUploadDataResponse(r); } @@ -650,7 +650,7 @@ export class ApiService implements ApiServiceAbstraction { } async renewAttachmentUploadUrl(id: string, attachmentId: string): Promise { - const r = await this.send('GET', '/ciphers/' + id + '/attachment/' + attachmentId, null, true, true); + const r = await this.send('GET', '/ciphers/' + id + '/attachment/' + attachmentId + '/renew', null, true, true); return new AttachmentUploadDataResponse(r); } diff --git a/src/services/fileUpload.service.ts b/src/services/fileUpload.service.ts index a323fe5e28..0ee72dab96 100644 --- a/src/services/fileUpload.service.ts +++ b/src/services/fileUpload.service.ts @@ -31,7 +31,7 @@ export class FileUploadService implements FileUploadServiceAbstraction { break; case FileUploadType.Azure: const renewalCallback = async () => { - const renewalResponse = await this.apiService.renewFileUploadUrl(uploadData.sendResponse.id, + const renewalResponse = await this.apiService.renewSendFileUploadUrl(uploadData.sendResponse.id, uploadData.sendResponse.file.id); return renewalResponse.url; };