/* eslint-disable no-var */

exports.getFileName = function (attachment) {
  // Get filename part of attachment file path.
  //
  // For example if filepath === '/foo/bar/baz.jpg'
  // then getFileName() === 'baz.jpg'
  var p = attachment.filepath
  return p.substr(p.lastIndexOf('/') + 1)
}

exports.getMimeType = function (attachment) {
  // Return null if no file
  return attachment.mimetype
}

exports.getThumbMimeType = function (attachment) {
  // Return null if no file
  return attachment.thumbmimetype
}

@@ -1,296 +1,4 @@
-/* eslint-disable no-var */%0A%0Aexports.getFileName = function (attachment) %7B%0A  // Get filename part of attachment file path.%0A  //%0A  // For example if filepath === '/foo/bar/baz.jpg'%0A  // then getFileName() === 'baz.jpg'%0A  var p = attachment.filepath%0A  return p.substr(p.lastIndexOf('/') + 1)%0A%7D%0A
 %0Aexp

Remove unnecessary attachment.getFileName