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 new POST /api/v1/messages/allocation endpoint. It returns response { "storageFileName": string, "replyToken": string, "uploadUrl": string }
- then browser extension should upload generated password-protected message content to S3 (using
storageFileName as file name) by sending PUT request to uploadUrl
- after successful message upload, extension should send
POST /api/v1/messages request with structure similar to current POST /api/v1/message request in webMessageUpload, but instead of including message content as encrypted.asc file, request should use storageFileName property with value received from POST /api/v1/messages/allocation request
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.
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:
/api/v1/message/new-reply-token, we should use newPOST /api/v1/messages/allocationendpoint. It returns response{ "storageFileName": string, "replyToken": string, "uploadUrl": string }storageFileNameas file name) by sending PUT request touploadUrlPOST /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/allocationrequestAlso, 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_URLSproperty - extension should use current flow with message upload to FES.For now, this functionality is enabled only for
...@flowcrypt.comusers, so for testing please use...@flowcrypt.comemail address. If you'll have any questions or find some issues - please mention me or @Jerbell.