Fix 0 byte file upload issue