0

I tried to use the following js, but it didn't seem feasible. PDF.js 'Hello, world!' example

How can I fix it?

function dispPhoto(file,suffix) {
  var $thumbArea = $('#thumbnail'+suffix);
  $thumbArea.empty();
  $('#fileName'+suffix).html( "" );
  $('#MSG_SHOKEN'+suffix).html("");

  if(!file || !file.type.match(/^image\/(jpeg|jpg|jpe|png)$|application\/pdf/)) {
    return false;
  }

  var isPdf = Boolean(file.type.match(/application\/pdf/));

  var reader = new FileReader();
  if (isPdf) {
     /*
      *
      */
  }
Zoe
  • 27,060
  • 21
  • 118
  • 148
DJQTDJ
  • 71
  • 1
  • 9

1 Answers1

0

convert ES6 to Es5 and use the character-set which you want

DJQTDJ
  • 71
  • 1
  • 9