Created a more ajax safe file upload for commandline uploads.