You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

6 lines
418 B

9 years ago
  1. Discourse.Utilities.getUploadMarkdown = function(upload) {
  2. if (Discourse.Utilities.isAnImage(upload.original_filename)) {
  3. return '<figure><img src="' + upload.url + '" width="' + upload.width + '" height="' + upload.height + '"></figure>';
  4. } else {
  5. return '<a class="attachment" href="' + upload.url + '">' + upload.original_filename + '</a> (' + I18n.toHumanSize(upload.filesize) + ')';
  6. }
  7. };