When using apex:inputFile to attach docs to an object,
<apex:inputFile value="{!attachment.body}" filename="{!attachment.name}" id="file"/>
I need to click a second button after selecting my file to save it,
<apex:commandButton action="{!upload}" value="Save"/>
Is there any way to automatically call the Save button from the inputFile? Or can the inputFile call my upload method?
I want to select a file and upload it in one click, is that possible?