Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

swfupload module - include file size info on popup


Go to End


3 Posts   1647 Views

Avatar
dezmond

Community Member, 17 Posts

20 August 2010 at 10:15pm

I'm sure this is really simple but I can't find a solution. How can i include some additional text on the file upload popup window that appears when swfupload module is installed? I just want it to say something like "max filesize is 500KB", and I don't mind hardcoding this rather than getting the actual max filesize from config.

Cheers.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

21 August 2010 at 1:56am

The super quick way to do it is in your getCMSFields() function:

$size = SWFUploadConfig::get_var('file_size_limit');
SWFUploadConfig::set_var('browse_button_text',"Browse (Max: $size)");

Avatar
dezmond

Community Member, 17 Posts

21 August 2010 at 2:57am

Thank you.