I have an @AuraEnabled
method in my APEX controller that have a lot of parameters:
@AuraEnabled
public static String sendEmail(
String toAddresses,
String ccAddresses,
String bccAddresses,
String fromAddress,
String subject,
String content,
String attachments,
String externalAttachments,
String staticFiles,
String dynamicFiles
) {}
where externalAttachments
is an array of objects (serialized) like this: [{ type: '', name: '', data: /*base64 data*/ '' }]
const payload = {
fromAddress: '',
toAddresses: JSON.stringify([]),
ccAddresses: JSON.stringify([]),
bccAddresses: JSON.stringify({}),
subject: subject,
content: contentEml,
attachments: JSON.stringify([]),
externalAttachments: JSON.stringify(filesCust),
staticFiles: JSON.stringify([]),
dynamicFiles: JSON.stringify([])
};
I used to work this way but since today, when there is a externalAttachment
, the action (in JS controller) is fired and the callback is always called with a state of error
but the server never received a request (in my logs).
Is there (until ?) a size limit, in byte, for the Lightning Controller <-> APEX Controller payload ?