base64-regex icon indicating copy to clipboard operation
base64-regex copied to clipboard

File does not validate as base64

Open maccyber opened this issue 8 years ago • 0 comments

This PDF-file does not validate as a valid base64. Any idea why?

const fs = require('fs')
const base64Regex = require('base64-regex')
const b64 = fs.readFileSync('./smalltest.pdf' ,'base64')
console.log(b64) // missing == at end
console.log(base64Regex().test(b64)) // false

maccyber avatar Apr 26 '17 11:04 maccyber