i am working on a need where in a text file needs which is uploaded, needs to be processed in the controller. We are uploading and displaying the uploaded file in the UI and the same needs to be passed to the controller in the next step.
I am using Java script remoting to pass the file from the UI to the controller. It was all working fine but noticed if i give a file of length greater than 1000000 length i get the below error. Is there a way we can avoid this and pass the file using Remoting.
Visualforce Remoting Exception: Input too long. [0, 1000000]
Below is my snippet
Visualforce.remoting.Manager.invokeAction(
'{!$RemoteAction.Translate.RunTranslation}',
'{!JSENCODE(sProcessedFile)}',
'{!SourceLanguageName}',
strUser,
'{!SourceLanguageCode}',
function(result, event){
if (event.status) {
jobid = result;
readyProgressbar(result);
}
else if (event.type === 'exception') {
alert('Exception 1'+event.message);
}
},
{escape: true}
);