mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
display the size of the attachment in the preview
instead of adding it during post processing
This commit is contained in:
@ -88,6 +88,7 @@ test("isAuthorizedUpload", function() {
|
||||
var getUploadMarkdown = function(filename) {
|
||||
return utils.getUploadMarkdown({
|
||||
original_filename: filename,
|
||||
filesize: 42,
|
||||
width: 100,
|
||||
height: 200,
|
||||
url: "/upload/123/abcdef.ext"
|
||||
@ -96,7 +97,7 @@ var getUploadMarkdown = function(filename) {
|
||||
|
||||
test("getUploadMarkdown", function() {
|
||||
ok(getUploadMarkdown("lolcat.gif") === '<img src="/upload/123/abcdef.ext" width="100" height="200">');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/upload/123/abcdef.ext">important.txt</a>');
|
||||
ok(getUploadMarkdown("important.txt") === '<a class="attachment" href="/upload/123/abcdef.ext">important.txt</a><span class="size">(42 Bytes)</span>');
|
||||
});
|
||||
|
||||
test("isAnImage", function() {
|
||||
|
Reference in New Issue
Block a user