How to upload multiple files using file input field

I am trying to upload my images one by one using

<input type="file" name="filem[]">

and next row added using jQuery

<div class="col-sm-12 class-bor-bottom"><a alt="Remove" class="removefile" href="javascript:void(0);"><img src="<?php echo Yii::app()->request->baseUrl.'/images/trash.gif'; ?>"></a><input type="file" name="filem[]"></div>

but now I get the first one data.
How to debug this…?

and also I try to this way.

<input type="file" name="filem[]">
<input type="file" name="filem[]">

it was working fine…

The script appending fields are not considered during the file upload… How to do using javascript