papa.ramu
papa.ramu

Reputation: 423

how to make uploaded file path in cake php plugins

here github.com/josegonzalez/cakephp-upload/ i downloaded image upload plugin and it's working fine and shows success message and db it will show file name but image are not found in local root here i tryed to change but i can't find the path to change my folder app\webroot\profile_pic how to change this..

i changed in model

public $actsAs = array(
        'Upload.Upload' => array(
            'photo' => array(
                'fields' => array(
                    'dir' => 'profile_pic'
                )
            )
        )
    );

Upvotes: 0

Views: 1215

Answers (1)

Tomasz Ferfecki
Tomasz Ferfecki

Reputation: 1263

That should work

public $actsAs = array(
        'Upload.Upload' => array(
            'path' => '{ROOT}webroot{DS}profile_pic{DS}',
            'photo' => array(
                'fields' => array(
                    'dir' => 'photo_dir'
                )
            )
        )
    );

Upvotes: 1

Related Questions