z_bodya
(Bogdan Savluk)
1
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:
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/
dan1
(dan_)
2
Another greats extension from Bogdan.
if i want attach pdf files?
z_bodya
(Bogdan Savluk)
3
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?
Sachy
(Sachin Mandalia)
5
ok I got the same message as above!