Thursday, April 3, 2014

CakePHP 2.3 Upload (Grafikart Plugin)

Hi,

I've download the plugin from: https://github.com/Grafikart/CakePHP-Upload

After load the plugin, i created the database with "thumb" column then i created this behavior in my model:

public $actsAs = array(
    'Upload.Upload' => array(
        'fields' => array(
            'thumb' => 'img/posts/:id1000/:id'
        )
    )
);

Then, i create this view for form:

echo $this->Form->input('thumb_file', array('type' => 'file'));

After try to save the data from form, it shows:

Warning (2): chmod() [function.chmod]: No such file or directory [APP\Plugin\Upload\Model\Behavior\UploadBehavior.php, line 54]

I've check the database and the "thumb column" shows:

/img/posts/1/3.	

FYI, i've created the folder img/posts at cakephp root folder. I'm using windows 7 and WAMP server. Is at any issues or anything wrong? 

Thank you. 

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/d/optout.

No comments: