ZF-5889: getFileSize and getFileMimeType non-existant?


Based on the documentation: {quote} $upload = new Zend_File_Transfer(); $upload->receive();

// Returns the sizes from all files as array if more than one file was uploaded $size = $upload->getFileSize(); {quote}

Firstly, using 'Zend_File_Transfer(); causes an exception: Zend_File_Transfer_Exception: Implementation in progress ... Transfer.php, So if you use: {quote} $upload = new Zend_File_Transfer_Adapter_Http(); $upload->receive();

// Returns the sizes from all files as array if more than one file was uploaded $size = $upload->getFileSize(); {quote}

It throws the error:

bq.Call to undefined method Zend_File_Transfer_Adapter_Http::getFileSize()

And likewise: {quote} $upload = new Zend_File_Transfer(); $upload->receive();

$mime = $upload->getMimeType(); {quote} It throws the error: {quote} Call to undefined method Zend_File_Transfer_Adapter_Http::getFileMimeType() {quote}


Based on the documentation you are referring to:

{quote} Limitation The current implementation of Zend_File_Transfer is limited to HTTP Post Uploads. Other adapters supporting downloads and other protocols will be added in future releases. Unimplemented methods will throw an exception. For now, you should use Zend_File_Transfer_Adapter_Http directly. As soon as there are multiple adapters available you can use a common interface. {quote}

And also the example in the manual reads:

{quote} $adapter = new Zend_File_Transfer_Adapter_Http();$adapter->setDestination('C:\temp');if (!$adapter->receive()) { $messages = $adapter->getMessages(); echo implode("\n", $messages);} {quote}

Hi thomas,

christian clearly stated a still existing error, the documentated methods getFileSize and getMimeType do NOT exists.

Please look into it.

Thanks, Littlex :)

The methods getFileSize and getMimeType, as stated in the documentation, do not exist.

They exist within Zend_File_Transfer_Adapter_Abstract since r13822 and r13935.

As we are not allowed to add new functionality within a mini-release they will be released with the next minor release as all new functionalities.

So the only real failure I see it a false assignment of the fix release.

As side note: The problem of the manual itself is part of a new proposal which I am working on with Mickael.

But this has nothing to do with this issue.