• Ranjith Kumar 201
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
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>
User-added image