Fix file uploading compatibility for 5.5