On Tue, Jun 16, 2009 at 8:56 AM, lakers fan<[email protected]> wrote: > Hello, > I have a form input of type 'file' to choose a file > > <?php echo $form->input('sourcedir', array('div' => false, 'label' => > false, 'class' => 'text', 'type' => 'file')); ?> > > Is it possible to select a directory instead of file?. If not how can I get > the full filepath.. > > i checked the $this->data['User']['sourcedir'].. there is no filepath in > that array only name is there.. > > how do i get the full filepath?..
You cannot. Browsers will only allow one to upload a file, and it will not send the path to the server. You can, however, use javascript to read the value of your file input element (it's read-only). But, again, you can only send a file. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
