If I use the attach file as marked in the image it does not upload the file size.
But if I use the paperclip to attach a file to a post it shows the size.
if (arr[1].indexOf("pdf") >= 0) {
$("#" + textId).insertAtCaret("[pdf]" + arr[0].replace('"', '') + "[/pdf]");
} else if (arr[1].indexOf("image") >= 0) {
$("#" + textId).insertAtCaret("[img]" + arr[0].replace('"', '') + "[/img]");
} else {
$("#" + textId).insertAtCaret("[file]" + arr[0].replace('"', '') + "[/file]");
}
var filesize = "";
if (arr[1].indexOf("pdf") >= 0) {
$("#" + textId).insertAtCaret("[pdf]" + arr[0].replace('"', '') + "[/pdf]");
} else if (arr[1].indexOf("image") >= 0) {
$("#" + textId).insertAtCaret("[img]" + arr[0].replace('"', '') + "[/img]");
} else {
if (arr.length === 3) {
filesize = arr[2].replace('"', '');
}
$("#" + textId).insertAtCaret("[file " + filesize + "]" + arr[0].replace('"', '') + "[/file]");
}
If you're having problems uploading, try choosing a smaller image.