Refactored small files input suport