rndme / download

file downloading using client-side javascript
MIT License
2.29k stars 417 forks source link

Does not seem to work with "audio/mpeg" mime format #39

Open shesmu opened 8 years ago

shesmu commented 8 years ago

Got an audio file coming in through ajax and when ajax receives it the file is the right size with correct headers but once its run through download it almost doubles in size and is not readable by mp3 players.

rndme commented 7 years ago

sounds like it's being processed as a string somehow, since strings use 2 bytes for each char. the file should be a Blob() in order to be download()ed. if you can get a url that plays by passing the blob to URL.getObjectURL(blob, {type:"audio/mpeg"}); you can download it. If that doesn't work either, the issue is upstream...