CTOlet / yii2-attachments

Yii2 extension for uploading and attaching the files to the models
66 stars 57 forks source link

Added image resize options to download #18

Open maxxer opened 9 years ago

maxxer commented 9 years ago

Requires himiklab/yii2-easy-thumbnail-image-helper

CTOlet commented 9 years ago

Something is wrong here. I cannot test that cause I have a memory limit when I try to print AttachmentsTable:

PHP Fatal Error – yii\base\ErrorException
Allowed memory size of 134217728 bytes exhausted (tried to allocate 14728 bytes)

That should not be cause 128 MB is enough

maxxer commented 9 years ago

How many images did you have attached to the model? How big are they? Maybe there's a memory leak in the EasyThumbnailImage::thumbnailImg call? I tried with few images and worked fine...

maxxer commented 9 years ago

I tried now with 6 images bigger than 2M each and I didn't have any problem in displaying the widget

CTOlet commented 9 years ago

It's very strange behaviour of the script on my Mac. I still dont understand the problem. I have attached only one image with size of 150 KB

maxxer commented 9 years ago

maybe php version? I tried on 5.5 and 5.6

adiramardiani commented 9 years ago

This is a great option when it comes true, why do not resize when you first insert to the database?

Sorry I was too stupid and could not pull request, but this time I saw a great resize behavior mongosoft : UploadImageBehavior zxbodya : ImageAttachmentBehavior

Whether it could be implemented here ?