You need to sign in to do that
Don't have an account?
Kumar Bittu
Invalid Page Redirection - While Posting File Data to Apex Controller using action:function
Hi All,
I am trying to upload file & attach with SFDC object , So I tried by using apex:fileinput but it is not working with my existing code because of rerendered issues. So Now I am trying using javascript to upload file but I am not able to pass the file data to apex controller using javascript.
Issue - Not able to pass file data using action:function parameter.
I am reffering to below URL -
http://manojjena20.blogspot.com/2015/11/apexinputfile-can-not-be-used-in.html
Please help me out.
Thanks in Advance.
I am trying to upload file & attach with SFDC object , So I tried by using apex:fileinput but it is not working with my existing code because of rerendered issues. So Now I am trying using javascript to upload file but I am not able to pass the file data to apex controller using javascript.
Issue - Not able to pass file data using action:function parameter.
I am reffering to below URL -
http://manojjena20.blogspot.com/2015/11/apexinputfile-can-not-be-used-in.html
Please help me out.
Thanks in Advance.
You have go to this URL-
https://salesforce.stackexchange.com/questions/24175/passing-method-parameters-with-apexactionfunction
But I am using the same process , which is provided in your URL.
<apex:actionFunction name="passToController" action="{!doAttachment}" reRender="frm">
<apex:param name="fname" value="" assignTo="{!filename}" />
<apex:param name="body" value="" assignTo="{!body}"/>
</apex:actionFunction>
But the problem is that we cannot pass file body data using actionFunction param. that is issue I am not able to get the body of file.
If you have any script , which upload file using javascript then please help me out.