File upload management
Page: 1, 2
Terry Johnson
on Dec 4. 2007. 11:38 am
Firefox's dragdropupload extension works by using javascript to add additional (usually hidden) file inputs to the form, with the same attributes as the field the files were dropped on to, thus to handle it on the server side you do something like this:
foreach ($_FILES['file']['name'] as $key=>$name) {
$file = new UploadedFile($name);
move_uploaded_file( $_FILES['file']['tmp_name'][$key], $file->getFileLocation() );
}
Terry Johnson
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...
VP Technology, Scribendi Inc.
http://www.scribendi.com - Editing, Proofreading and more...



