def basename attachment, style_name
      attachment.original_filename.gsub(/#{File.extname(attachment.original_filename)}$/, "")
    end
def basename attachment, style_name
      attachment.original_filename.gsub(/#{File.extname(attachment.original_filename)}$/, "")
    end
Returns the basename of the file. e.g. "file" for "file.jpg"