fix upload error when file is larger then 8192 bytes