Image Attachment Extension

Recently I have done work on extension intended to manage image associated with CActiveRecord model.

Extension provides nice way to manage image associated with model:

  • ajax image management

  • automatic image processing(previews, etc)

Extension has following parts:

  • behavior for model

  • widget for image management (upload, replacement, removal)

  • action to provide api for widget

More details here:

http://www.yiiframework.com/extension/image-attachment/

Another greats extension from Bogdan.

if i want attach pdf files?

By now pdf is not supported - only "simple" images…

The problem is that pdf is completely different - preview generation is a bit complicated, also there is less sense in preview.

Also in case of attachments like pdf or other documents, probably there is need for other features like:

possibility to download file, or preserve file name when downloading, access restrictions, etc - so probably it will be another extension.

If you need just attach file (without previews, etc), take a look at:

http://www.yiiframework.com/extension/fileimagearbehavior

(it was not updated for a long time, so my fork: https://bitbucket.org/z_bodya/fileimagearbehavior)

Hi, nice ext. I followed all step of your doc, but page return me always the same message "Before image upload save this." Why this?

ok I got the same message as above!