Issues

ZF-5889: getFileSize and getFileMimeType non-existant?

Issue Type: Bug Created: 2009-02-26T04:05:10.000+0000 Last Updated: 2009-03-17T11:26:17.000+0000 Status: Resolved Fix version(s): - 1.8.0 (30/Apr/09)

Reporter: Christian Lau (joedamage) Assignee: Thomas Weidner (thomas) Tags: - Zend_File_Transfer

Related issues: Attachments:

Description

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}

Comments

Posted by Thomas Weidner (thomas) on 2009-02-26T04:23:14.000+0000

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}

Posted by Ota Mares (ota) on 2009-03-17T09:29:08.000+0000

Hi thomas,

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

Please look into it.

Thanks, Littlex :)

Posted by Ota Mares (ota) on 2009-03-17T09:36:41.000+0000

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

Posted by Thomas Weidner (thomas) on 2009-03-17T11:19:13.000+0000

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.

Posted by Thomas Weidner (thomas) on 2009-03-17T11:26:16.000+0000

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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts