When I'm uploading file from lightning out (apex page) and attach it to my record in Notes & Attachments related list salesforce doesn't show file size. It shows only when I'm uploading from salesforce page. How to show file size?
-
are you talking about the standard related list? Can you add a screenshot?– sanket kumarCommented Jun 26, 2020 at 14:24
-
@sanketkumar just added. Yes it's standard related list– Igor VasylevskyiCommented Jun 26, 2020 at 14:28
-
how are you uploading the file using lightning:out? Can you add the minimal required as well?– sanket kumarCommented Jun 26, 2020 at 14:37
-
@sanketkumar I'm uploading file as attachment from vf page, but when I'm uploading file inside salesforce it upload file as ContentDocument. I guess it's main problem and I need to upload file like ContentDocument– Igor VasylevskyiCommented Jun 26, 2020 at 14:45
-
That is indeed correct, Files and Attachments are shown in different way in Related list on record– kurunveCommented Jun 26, 2020 at 14:49
|
Show 1 more comment
1 Answer
Bodylength - Size of the file (in bytes) of the attachment.
Unfortunately, You cannot add this field on notes and attachment-related list as this is not customizable.
The workaround is you can create a simple custom Lightning Component to show attachment as a table.