Anyone can explain how do i actually display file size (umbracoBytes) of an uploaded pdf file from a node itself.
Here am not making use of the media section, so each node has an upload file where i can upload pdf file related to the page content. Now i need to display the file size of the pdf.
How do i to do this since i dont have any umbracoBytes alias ?
1. Add a "Label" type property with the alias umbracoBytes to the doctype - it won't work for existing files, but any new uploads will automatically get their filesizes filled in (at least that's what I'd assume).
2. Check if uComponents has an extension for this...
@Chriztian this is exactly what i did, adding a new property in my doctype with alias umbracoBytes, but as mentioned it did the trick only when i uploaded a new file not existing ones.
@Tom thanks for pointing out uComponents, will have a try at both suggestions.
Display umbracoBytes from uploaded file
Anyone can explain how do i actually display file size (umbracoBytes) of an uploaded pdf file from a node itself.
Here am not making use of the media section, so each node has an upload file where i can upload pdf file related to the page content. Now i need to display the file size of the pdf.
How do i to do this since i dont have any umbracoBytes alias ?
Any suggestions most welcome
//fuji
Hi Fuji,
I can only think of two solutions:
1. Add a "Label" type property with the alias umbracoBytes to the doctype - it won't work for existing files, but any new uploads will automatically get their filesizes filled in (at least that's what I'd assume).
2. Check if uComponents has an extension for this...
/Chriztian
Beat me to it! If you have uComponents, you can use:
-Tom
Hi guys,
@Chriztian this is exactly what i did, adding a new property in my doctype with alias umbracoBytes, but as mentioned it did the trick only when i uploaded a new file not existing ones.
@Tom thanks for pointing out uComponents, will have a try at both suggestions.
//fuji
is working on a reply...