function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Ranjith Kumar 201Ranjith 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>
User-added image
pankul guptapankul gupta
Please follow the below URL as it is with regards to the same issue:

https://developer.salesforce.com/forums/?id=906F0000000g0ZjIAI