var loadFile = function(event) {
  var output = document.getElementById('image-preview');
  var imgFile = event.target.files[0];

  if (imgFile.type === "image/tiff") {
    output.src = '<%= asset_path "placeholder-green.png" %>';
  } else {
    output.src = URL.createObjectURL(imgFile);
  }
};

var loadFile = function(event) {
  var output = document.getElementById('image-preview');
  var imgFile = event.target.files[0];

  if (imgFile.type === "image/tiff" || imgFile.type === "application/pdf") {
    output.src = '<%= asset_path "placeholder-green.png" %>';
  } else {
    output.src = URL.createObjectURL(imgFile);
  }
};

Extend tiff functionality to pdf as no preview is available
Extend tiff functionality to pdf as no preview is available