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

apex:inputFile can not be used in conjunction with an action component

Hi all,


Does anyone know a workaround to this?




<apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute.>




Any ideas in how to rerender that section?


<apex:commandButton value="TESTUPLOAD" action="{!saveAttach}" rerender="attachmentList"/>


    <apex:outputpanel id="attachmentList"  > 
    <apex:pageBlock title="{!$Label.Files}"  >
        <apex:pageBlockTable value="{!attachments}" var="attachment" >
            <apex:column headerValue="{!$Label.Action}">
               <apex:outputLink value="{!URLFOR($Action.Attachment.Download, attachment.Id)}" target="_blank">{!$Label.View}</apex:outputLink>
            <apex:column value="{!attachment.Name}"/>
            <apex:column value="{!attachment.Description}"/>






This has been covered many times before.  You can choose between an IFrame style hack or a customized uploader (say flash with php middle tier?)


Please promote my idea to upgrade visualforce to web 2.0 (including gmail style file upload).