Fileupload element and file size at the end of file name

nemanja

New Member
How can I get through the fileupload plugin file size that stands after the file name? See attached file.
 

Attachments

  • printscrean.png
    printscrean.png
    4.6 KB · Views: 34
Are you saying you want it to look like that? I'm pretty sure we don't append the file size at the moment.

If so, you could do that on a per filetype basis by overriding one of the layouts from plugins/fabrik_element/fileupload/layouts (see wiki for where to put layout files to override the built in ones). Unfortunately we don't pass the actual file path or size in to the layout, but you've got the URL to it in $d->file, like ...

http://localhost/joomla/images/stories/main_test/OHMI1.png

... so you could get the path by doing something like ...

Code:
$filepath = str_replace(COM_FABRIK_LIVESITE, COM_FABRIK_BASE, $d->file);
$filesize = filesize($filepath);

... and use $filesize in the ouput.

-- hugh
 
Are you saying you want it to look like that? I'm pretty sure we don't append the file size at the moment.

If so, you could do that on a per filetype basis by overriding one of the layouts from plugins/fabrik_element/fileupload/layouts (see wiki for where to put layout files to override the built in ones). Unfortunately we don't pass the actual file path or size in to the layout, but you've got the URL to it in $d->file, like ...

http://localhost/joomla/images/stories/main_test/OHMI1.png

... so you could get the path by doing something like ...

Code:
$filepath = str_replace(COM_FABRIK_LIVESITE, COM_FABRIK_BASE, $d->file);
$filesize = filesize($filepath);

... and use $filesize in the ouput.

-- hugh

Yes, I want to look like the picture I sent. I will try to see if it works.

I can not see the image from the link.
 
Last edited:
The image link I gave you was just an example of the string you have to manipulate to get the path to the file.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top