getFile() is for download and download is not implemented for now.
getFileName() needs the elements name and not a array or a filename.

Both can be seen by looking at API doc and actual manual.

Greetings
Thomas Weidner, I18N Team Leader, Zend Framework
http://www.thomasweidner.com


----- Original Message ----- From: "Peter Wansch" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, September 24, 2008 6:08 PM
Subject: [fw-general] Unable to get destination file name from Zend_File_Transfer_Adapter_Http



Hi,
I use a Zend_File_Transfer_Adapter_Http like this:

               $adapter = new Zend_File_Transfer_Adapter_Http();

               $adapter->addValidator('Extension', array('gif', 'jpg'))
                       ->addValidator('Size', '10kB')
                       ->addValidator('FilesSize', '10kB')
                       ->addValidator('Count', 1)
->addValidator('ImageSize', array(60, 60, 320, 240))
                       ->addValidator('MimeType', array('image/jpeg',
'image/gif'))
                       ->setDestination(GGV_PATH_ROOT .
'/www/images/member/');

               // Set a destination path for files
               $adapter->addFilter('Rename', array(GGV_PATH_ROOT .
'/www/images/member/member_image_' . $member->member_id, true));

This works quite well.

After receiving the file, I want to find out it's filename:

                   $files = $adapter->getFile();
                   $fileName =  $adapter->getFileName($files[0]);

because I don't know if the extension is jpg or gif.

When I try the above I get a Message: Method not implemented  exception.

Now I could use standard PHP functions to determine the filename but I
thought it must be possible to get the file name from the adapter.

I am using ZF 1.6.1. Thank you!!
--
View this message in context: http://www.nabble.com/Unable-to-get-destination-file-name-from-Zend_File_Transfer_Adapter_Http-tp19652264p19652264.html Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to