milesj / uploader

[Deprecated] A CakePHP plugin for file uploading and validating.
MIT License
193 stars 73 forks source link

PNG warning #122

Closed LaPeste closed 11 years ago

LaPeste commented 11 years ago

When I upload png files, the plug-in does everything I ask but the web page reports:

Warning (2): exif_read_data(lin-png-256x256-Donatelo_256x256-png-256x256.png): File not supported [APP\Vendor\mjohnson\transit\src\Transit\File.php, line 182]

exif_read_data - [internal], line ?? Transit\File::Transit{closure}() - APP\Vendor\mjohnson\transit\src\Transit\File.php, line 182 Transit\File::_cache() - APP\Vendor\mjohnson\transit\src\Transit\File.php, line 555 Transit\File::exif() - APP\Vendor\mjohnson\transit\src\Transit\File.php, line 195 Transit\File::toArray() - APP\Vendor\mjohnson\transit\src\Transit\File.php, line 524 AttachmentBehavior::beforeSave() - APP\Plugin\Uploader\Model\Behavior\AttachmentBehavior.php, line 301 ObjectCollection::trigger() - CORE\Cake\Utility\ObjectCollection.php, line 132 call_user_func - [internal], line ?? CakeEventManager::dispatch() - CORE\Cake\Event\CakeEventManager.php, line 248 Model::save() - CORE\Cake\Model\Model.php, line 1685 UsersController::add() - APP\Controller\UsersController.php, line 41 ReflectionMethod::invokeArgs() - [internal], line ?? Controller::invokeAction() - CORE\Cake\Controller\Controller.php, line 486 Dispatcher::_invoke() - CORE\Cake\Routing\Dispatcher.php, line 187 Dispatcher::dispatch() - CORE\Cake\Routing\Dispatcher.php, line 162 [main] - APP\webroot\index.php, line 109

the code that throw this warning is:

if ($data = exif_read_data($file->path())) {

I hope this is enough to help you to understand what is going on.

milesj commented 11 years ago

Oh right, exif only works on JPGs, I should probably filter other types out.

milesj commented 11 years ago

Should be fixed in Transit 1.3.3.

LaPeste commented 11 years ago

Well! You're doing a great job! :)

2013/6/14 Miles Johnson notifications@github.com

Should be fixed in Transit 1.3.3.

— Reply to this email directly or view it on GitHubhttps://github.com/milesj/Uploader/issues/122#issuecomment-19471319 .