Jump to content

Multiplie file upload


Manaus
 Share

Recommended Posts

Hello, I have this code

	$a = new WireUpload('documents');
	$a->setMaxFiles(10);
	$a->setOverwrite(false);
	$a->setDestinationPath($c->documents->path()); 
	$a->setValidExtensions(array('jpg','jpeg','png','gif','doc','docx','xls','xlsx','pdf')); 
	$c->of(false);
	foreach ($a->execute() as $files) {
		$c->documents->add($files);
	}
	$c->save();
	$c->of(true);

but I manage to save only one file...
I put the multiple="multiple" attribute on the file input.

Any suggestion?

Thanks!...

Link to comment
Share on other sites

but I manage to save only one file...

I put the multiple="multiple" attribute on the file input.

What's your <input type='file'> code look like? How are you outputting the multiple <input's> for each file? Does your name attribute read 'documents[]' (indicating an array) rather than just 'documents' ?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...