yii2-crop-image-upload icon indicating copy to clipboard operation
yii2-crop-image-upload copied to clipboard

I need some help =)

Open thiagomoraesp opened this issue 9 years ago • 1 comments

Hello, I have some problems using its extension, but it is the extension that comes closer to doing what I need, so I'm insisting on the use of it =)

My problme is that the cropped_field is not saved on the database, the original image name is filled but the cropped_field always is null, and the file is not being saved on the filesystem(the original is, so it's not a permission problem.)

here is my view: https://gist.github.com/anonymous/71d0f853dfacef3a2d7b

heres the code snippet on my controller https://gist.github.com/anonymous/d990cac23607b3ecf705

and here is my model: https://gist.github.com/anonymous/387c1a5385e3065cc2bc

And here'sd my database table:

+----------------------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------------------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | auto_increment | | intencao | text | NO | | NULL | | | imagem_de_perfil | blob | YES | | NULL | | | imagem_de_capa | blob | YES | | NULL | | | imagem_secundaria | blob | YES | | NULL | | | intencao_resumida | text | YES | | NULL | | | contato_email | text | YES | | NULL | | | contato_twitter | text | YES | | NULL | | | contato_facebook | text | YES | | NULL | | | contato_linkedin | text | YES | | NULL | | | contato_skype | text | YES | | NULL | | | arquivo_imagem_de_perfil | blob | YES | | NULL | | | arquivo_imagem_de_perfil_cropped | blob | YES | | NULL | | | crop | varchar(255) | YES | | NULL | | +----------------------------------+--------------+------+-----+---------+----------------+ 14 rows in set (0.00 sec)

Did you know what im doing wrong? :( How can i get the arquivo_imagem_de_perfil_cropped filled with the cropped image name.

i hope you can help me, and sorry me poor english :P

thiagomoraesp avatar Jul 11 '15 00:07 thiagomoraesp

Hi will try to find the reason. Have you tried to debug it? first thing I see is that you don't need to have blob type for images in DB because this fields doesn't contain image itself - they store just image file names and can be simple varchar. it is not the bug reason - just improvement :)

karpoff avatar Jul 13 '15 20:07 karpoff