【问题标题】:Laravel 5: TinyMCE 4 images have broken urlsLaravel 5:TinyMCE 4 图像的网址损坏
【发布时间】:2015-09-04 20:53:24
【问题描述】:

我刚刚安装了 TinyMCE + jbimages 插件,可以直接从编辑器上传照片。 上传成功,但显示因相关网址而中断。

我添加了一篇来自 http://localhost/laravel-5/article/create 并上传图片,它甚至可以在编辑器中显示图片。

编辑器里的图片路径写着../images/display-error1.jpg

但在提交后返回博客页面localhost/laravel-5/articles

图片不显示。它指向localhost/laravel-5/images/image.jpg 并完全跳过public

这是tinymce/plugins/jbimages/config.php中的上传路径配置

$config['img_path'] = '/laravel-5/public/images'; // Relative to domain name
$config['upload_path'] = $_SERVER['DOCUMENT_ROOT'] . $config['img_path'];

我该如何解决这个问题?谢谢。

【问题讨论】:

    标签: php laravel laravel-5 tinymce


    【解决方案1】:

    我在这里找到了答案:https://www.tinymce.com/docs/configure/file-image-upload/#images_upload_base_path

    只需添加images_upload_base_path: '/base/path/to-images'

    【讨论】:

      猜你喜欢
      • 2019-07-21
      • 2014-09-12
      • 2017-06-23
      • 2020-12-05
      • 2010-10-12
      • 2017-09-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多