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

uploading more than 1 file with SWFUploadFileIFrameField


Go to End


2 Posts   1540 Views

Avatar
Phill

Community Member, 81 Posts

28 April 2009 at 10:43pm

Edited: 28/04/2009 10:44pm

Hey

Im trying to use the flash uploader module for uploading more than 1 file at a time in the admin area, iv been looking through the documentation but cant get it to upload more than one file at a time, any ideas on what im doing wrong?

static $has_one = array ('BigFile' => 'File');
 
public function getCMSFields()
{
	$fields = parent::getCMSFields();
	$fields->addFieldToTab("Root.Content.File", new SWFUploadFileIFrameField('BigFile','Upload a file',array('file_upload_limit' => '2')));
	return $fields;
}

The code doesnt seem to be triggering an error it just displays a javascript alert.

"You have attempted to queue too many files.
You may select 1"

thanks

Avatar
UncleCheese

Forum Moderator, 4102 Posts

29 April 2009 at 4:09am

Hi, Phill,

Sorry, it doesn't handle a has_many File relation right now. :(

I would try using the FileDataObjectManager if you have multiple files on your page.