Wrong extension detection if path includes folder name
vorg opened this issue · comments
Marcin Ignac commented
I was wondering why my jpg files are actually png inside and it turns out that...
var fileExtension = require("file-extension")
console.log(fileExtension("bla.jpg")) -> 'jpg'
console.log(fileExtension("bla\bla.jpg")) -> 'undefined'
Marcin Ignac commented
Actually issue was somewhere else as i was using toBlob and not providing file name...
Damien Seguin commented
Closing as filenames assigned to the html link element download property can't be path.