yiidoc / yii2-redactor

Extension Redactor WYSIWYG for Yii2 framework
BSD 3-Clause "New" or "Revised" License
187 stars 87 forks source link

Image is not uploading instead it returns only an alret having "true" written on it #47

Open muzammilhassan opened 8 years ago

muzammilhassan commented 8 years ago

Hi,

Every one Please guide me how to upload image in editor , I have tried all the options it is not uploading please guide and help

Thanks

wingsryder commented 8 years ago

This might help (Tested on windows only):

enable this extension by removing "; " from the php.ini file and restart Xampp ;extension=php_fileinfo.dll to extension=php_fileinfo.dll

Screenshot : http://prntscr.com/btnpcg yii2error

Also I haven't made any changes to default code , upload works well for me.

<?= $form->field($model, 'comments')->textArea(['rows' => '6'])->widget(\yii\redactor\widgets\Redactor::className()]); ?>

I have debug the issue and that gave me this info. After enabling it work for me. Hope this help someone.

muzammilhassan commented 8 years ago

Thank you for your answer.

nexdevs commented 8 years ago

It may be the urlManager, just disable urlManger and it'll automatically work as expected.

You can fix this adding the next rule:

'rules' => [ '<controller:\w+>/redactor' => '/redactor/upload/image', ],

cougar999 commented 7 years ago

@tav4u I think you are right, I saw a "301 Moved Permanently" message after uploading. If comment EnablePrettyUr inl urlManager, it works fine.

But, I added your rule , it still can't work.

craftsmann commented 7 years ago

i also meet this issue :)

tsaffi commented 7 years ago

I also face the same difficulty. @tav4u where do i find urlManager class ??

todk1983 commented 5 years ago

i have also same problem, any solution ,plz help thank