You need to sign in to do that
Don't have an account?
Ranjith Kumar 201
Error : inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.
Error:
apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.
Class:
<apex:form style="margin-top:5%;margin-left:5%;width:60%">
<apex:pageblock >
<apex:commandbutton styleClass="myClass" onclick="this.value = 'Authenticating....'" action="{!DriveAuth}" value="Google Drive Authentication"/>
<apex:inputfile value="{!file}" contentType="{!filetype}" filename="{!filename}" onchange="getFileData(this);"/>
<div>
<apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:outputPanel id="opl">
<apex:commandButton styleClass="myClass" onclick="this.value = 'Uploading...'" value="Upload file" action="{!UploadFile}" reRender="opl"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</div>
apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.
Class:
<apex:form style="margin-top:5%;margin-left:5%;width:60%">
<apex:pageblock >
<apex:commandbutton styleClass="myClass" onclick="this.value = 'Authenticating....'" action="{!DriveAuth}" value="Google Drive Authentication"/>
<apex:inputfile value="{!file}" contentType="{!filetype}" filename="{!filename}" onchange="getFileData(this);"/>
<div>
<apex:pageBlockSection>
<apex:pageBlockSectionItem >
<apex:outputPanel id="opl">
<apex:commandButton styleClass="myClass" onclick="this.value = 'Uploading...'" value="Upload file" action="{!UploadFile}" reRender="opl"/>
</apex:outputPanel>
</apex:pageBlockSectionItem>
</apex:pageBlockSection>
</div>
https://developer.salesforce.com/forums/?id=906F0000000g0ZjIAI