drag and drop primefaces
<div class="card">
<h:form>
<p:fileUpload listener="#{fileUploadView.handleFileUpload}" mode="advanced" dragDropSupport="true"
update="messages"/>
<p:growl id="messages" showDetail="true"/>
</h:form>
</div>