Added .encode the file contents for uploading to work.