Use open-uri and Tempfile in binary mode