sfAttachPlugin - 0.2

sfAttachPlugin

You are currently browsing
the website for symfony 1

Visit the Symfony2 website


« Back to the Plugins Home

Signin


Forgot your password?
Create an account

Tools

Stats

advanced search
Information Readme Releases Changelog Contribute
Show source

sfAttachPlugin install

sfAttach

From svn into plugins directory.

./symfony plugin:publish-assets
./symfony propel-build-all
./symfony cc

In model:

sfPropelBehavior::add('MODEL_NAME', array('sfAttachPlugin'));

In generator.yml

fields:
    attachments: {type: sfAttach, params: { limit: 1, ext: '*.asd;*.exe;' } }

In frontend:

$attachments = $object->getAttachments();

    foreach ( $attachments as $attachment ){
        echo link_to(image_tag( $attachment->getFilename());
        }

Files

sf_upload_dir Thumbnails in sf_upload_dir / thumb