Php 通过拖放上传文件时如何创建progressbar

Php 通过拖放上传文件时如何创建progressbar,php,ajax,upload,drag-and-drop,progress,Php,Ajax,Upload,Drag And Drop,Progress,对于文件上传,我有一个progressbar,它与表单配合使用非常好。 这是我的表格: <form class="sfmform" action="" method="post" enctype="multipart/form-data"> <input type="file" name="file" id="file" /> <br /> <input type="submit" class="Butt

对于文件上传,我有一个progressbar,它与表单配合使用非常好。 这是我的表格:

 <form class="sfmform" action="" method="post" enctype="multipart/form-data">
        <input type="file" name="file" id="file" />
        <br />
        <input type="submit" class="Button Primary" name="upload" value="Upload" />

    </form>
现在我还使用拖放div来上传文件。这是拖放的div:

<div class="sfmform" id="drop-area"><h3 class="drop-text">Drag and Drop Files Here</h3></div>
在此处拖放文件
通过拖放上传文件时,如何调用相同的progressbar

<div class="sfmform" id="drop-area"><h3 class="drop-text">Drag and Drop Files Here</h3></div>