Fixing bug when submit small files using api