Fixed truncated files on upload issue.