You need to sign in to do that
Don't have an account?

Can inputFile be used with a different standardController ?
The documentation has the example
<apex:page standardController="Document" extensions="documentExt"> <-- Upload a file and put it in your personal documents folder--> <apex:messages /> <apex:form id="theForm"> <apex:pageBlock> <apex:pageBlockSection> <apex:inputFile value="{!document.body}" filename="{!document.name}"/> <apex:commandButton value="save" action="{!save}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Is it possible to use the inputFile tag with another controller? For example:
<apex:page standardController="Some_Custom_Object__c" extensions="documentExt"> <-- Upload a file and put it in your personal documents folder--> <apex:messages /> <apex:form id="theForm"> <apex:pageBlock> <apex:pageBlockSection> <apex:inputFile value="{!document.body}" filename="{!document.name}"/> <apex:commandButton value="save" action="{!save}"/> </apex:pageBlockSection> </apex:pageBlock> </apex:form> </apex:page>
Thanks.
What are you attempting to do?
InputFile must be bound to a blob in apex or a blob field type. The reason the example uses the standard controller on document is so it can bind directly to the document.body.
You can use inputFile with any type of controller/standardController/extension that you want, but ultimately the value has to be bound to a Blob.