axetroy / react-download

react component for click and then download the specify content file.
https://axetroy.github.io/react-download/
MIT License
36 stars 8 forks source link

invalid propType when passing UTF8 bytes array to content prop #12

Open capi1O opened 6 years ago

capi1O commented 6 years ago

This is just a warning : Warning: Failed prop type: Invalid propcontentof typeobjectsupplied toDownload, expectedstring. in Download, the file is downloaded correctly.

It happens when content property is set to a UTF8 bytes array.

If I convert the byte array to a string, there is no warning but the file data is then incorrect (I am trying to download a PDF file).