Error posting post
yuri25 opened this issue · 3 comments
yuri25 commented
When posting a post, this error occurs:
Intervention \ Image \ Exception \ NotReadableException Unable to init from given url (http://youwo.ru/\files/img02.jpg).
Unable to init from given url (http://youwo.ru/\files/img02.jpg). /......../youwo.ru/vendor/intervention/image/src/Intervention/Image/AbstractDecoder.php#83
bestmomo commented
Check folder authorizations.
yuri25 commented
Error found here:
/...../resources/views/back/posts/template.blade.php
222 function processSelectedFile(filePath, requestingField) {
223 $('#' + requestingField).val('\\' + filePath)
224 $('#img').attr('src', '\\' + filePath)
225 }
It is necessary to change slashes as follows:
222 function processSelectedFile(filePath, requestingField) {
223 $('#' + requestingField).val('\/' + filePath)
224 $('#img').attr('src', '\/' + filePath)
225 }
Now this error has been fixed.
whitehorse0 commented
Or it can also happen because of
// App\Services\Thumb.php
// Error found here:
$image = Image::make(url($model->image))->widen(100);
// updated
$image = Image::make(public_path() . $model->image)->widen(100);
note: this is just an alternative solution