snippet to upload a text file from the browser