@@ -117,6 +117,7 @@ const {
117117 LIST_UNSUBSCRIBE_NOTIFY ,
118118 FETCH_TIMEOUT ,
119119 DEFAULT_MAX_BODY_SIZE ,
120+ DEFAULT_MAX_PAYLOAD_TIMEOUT ,
120121 DEFAULT_EENGINE_TIMEOUT ,
121122 DEFAULT_MAX_ATTACHMENT_SIZE ,
122123 MAX_FORM_TTL ,
@@ -202,6 +203,9 @@ const IMAP_WORKER_COUNT = getWorkerCount(readEnvValue('EENGINE_WORKERS') || (con
202203// NB! the default for other requests is 1MB
203204const MAX_BODY_SIZE = getByteSize ( readEnvValue ( 'EENGINE_MAX_BODY_SIZE' ) || config . api . maxBodySize ) || DEFAULT_MAX_BODY_SIZE ;
204205
206+ // Payload reception timeout in milliseconds for message upload requests
207+ const MAX_PAYLOAD_TIMEOUT = getByteSize ( readEnvValue ( 'EENGINE_MAX_PAYLOAD_TIMEOUT' ) || config . api . maxPayloadTimeout ) || DEFAULT_MAX_PAYLOAD_TIMEOUT ;
208+
205209// CORS configuration for API requests
206210// By default, CORS is not enabled
207211const CORS_ORIGINS = readEnvValue ( 'EENGINE_CORS_ORIGIN' ) || ( config . cors && config . cors . origin ) ;
@@ -3581,7 +3585,8 @@ When making API calls remember that requests against the same account are queued
35813585 } ,
35823586 options : {
35833587 payload : {
3584- maxBytes : MAX_BODY_SIZE
3588+ maxBytes : MAX_BODY_SIZE ,
3589+ timeout : MAX_PAYLOAD_TIMEOUT
35853590 } ,
35863591
35873592 description : 'Upload message' ,
@@ -4627,7 +4632,8 @@ When making API calls remember that requests against the same account are queued
46274632 } ,
46284633 options : {
46294634 payload : {
4630- maxBytes : MAX_BODY_SIZE
4635+ maxBytes : MAX_BODY_SIZE ,
4636+ timeout : MAX_PAYLOAD_TIMEOUT
46314637 } ,
46324638
46334639 description : 'Submit message for delivery' ,
0 commit comments