-
Notifications
You must be signed in to change notification settings - Fork 53
Description
Currently password-protected messages attachments have maximum size ~5mb. To support larger attachments, we implemented new API in FES - it uses pre-signed S3 URLs, so messages are uploaded directly from browser extension.
This change requires some code changes:
- instead of using
/api/v1/message/new-reply-token, we should use newPOST /api/v1/messages/allocationendpoint. It returns response{ "storageFileName": string, "replyToken": string, "uploadUrl": string } - then browser extension should upload generated password-protected message content to S3 (using
storageFileNameas file name) by sending PUT request touploadUrl - after successful message upload, extension should send
POST /api/v1/messagesrequest with structure similar to currentPOST /api/v1/messagerequest in webMessageUpload, but instead of including message content asencrypted.ascfile, request should usestorageFileNameproperty with value received fromPOST /api/v1/messages/allocationrequest
Also, let's leave ability to use our existing api - so both these implementations will be available in browser extension. By default, new flow with pre-signed S3 URL should be used, but if client configuration has DISABLE_FES_PRESIGNED_URLS property - extension should use current flow with message upload to FES.
For now, this functionality is enabled only for ...@flowcrypt.com users, so for testing please use ...@flowcrypt.com email address. If you'll have any questions or find some issues - please mention me or @Jerbell.