changing file uploading mechanism to xhr with multipart/form-data