var $fileOther = $("#file_other"); var prev = $fileOther.val(); if(prev) prev += ','; $fileOther.val(prev + file.name);