milesj / uploader

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

transit problem #132

Closed Aziza closed 11 years ago

Aziza commented 11 years ago

thank you for this great plugin http://milesj.me/code/cakephp/uploader . i use cakephp 2.2 and running wamp PHP 5.3.9 i have a problem when I attempt to submit a file I get the following error.

Fatal Error

Erreur: Class 'Transit\Transit' not found File: C:\wamp\www\asc-project\app\Plugin\Uploader\Model\Behavior\AttachmentBehavior.php Line: 248

Attention: Si vous voulez personnaliser ce message d'erreur, créez app\View\Errors\fatal_error.ctp

i install the composer but i still unable to make this plugin work

require_once dirname(DIR) . '/Vendor/autoload.php';

can you help me I've been trying to get image uploads working for 2 days now with no success

milesj commented 11 years ago

Does Transit exist in the vendor folder? If not, add it to the composer list. Composer is probably failing to download circular dependencies.

Aziza commented 11 years ago

no Transit doesn't exist in my app\Vendor
how can i add it ?

milesj commented 11 years ago

Have you installed everything with composer install or composer update?

Like I mentioned previously, you need to add transit to your composer.json file.

Aziza commented 11 years ago

i installed with composer install can you tell me how can i add transit to my composer.json file. this is my app/composer.json : { "config": { "vendor-dir": "Vendor" }, "require": { "mjohnson/uploader": "4.", "mjohnson/decoda": "6." } } thank you in advance

milesj commented 11 years ago

Add the package and version to the require list. If I just give you the solution you wouldn't learn anything.

https://packagist.org/packages/mjohnson/transit

Aziza commented 11 years ago

Thanks a lot mile it work now :)

mmiikkeea commented 10 years ago

could you please tell me what exactly you did to make it work??

bkingg commented 8 years ago

add this to your core.php at the top

require_once dirname(DIR) . '/Vendor/autoload.php';