You need to sign in to do that
Don't have an account?
NeedHelp55
Attach Multiple File at Once using Apex. Is it possible? Please Help.
Hi,
I need to upload mutiple attachment at once by selecting them all. Is it possible in salesforce?
I need to upload mutiple attachment at once by selecting them all. Is it possible in salesforce?
https://developer.salesforce.com/forums/?id=906F0000000AbocIAC
Anyway i am able to select multiple item but cofused how to save them using javascript.
<apex:page controller="uploadAttachment" id="pageId">
<script>
function handleFileSelect(evt) {
alert('{!acc.Id}');
var temp = evt.target.files; // FileList object
var output = [];
for (var i = 0, f; f = temp[i]; i++) {
output.push('<li><strong>', f.name, '</strong></li>');
}
document.getElementById('list').innerHTML = '<ul>' + output.join('') + '</ul>';
}
window.onload = function onBodyLoad() {
document.getElementById('files').addEventListener('change', handleFileSelect, false);
}
</script>
<apex:form id="formId">
<input type="file" id="files" name="files[]" multiple="true" />
<output id="list"></output>
<!--<apex:repeat value="{!attachmentList}" var="iterate">
<br/><apex:outputText value="{!iterate.Name}" styleClass="test"/><br/><br/>
</apex:repeat>-->
</apex:form>
</apex:page>
Any idea on this. Please.
Thanks.