Added better file upload support