I think if you will move the data to the downloadData, you don't have to parse the data URI.