4

我正在使用 Laravel 8。我的网站的公共目录是 public_html,我已经对 appservice 提供者进行了适当的更改:

 public function register()
{
     $this->app->bind('path.public', function() {
            return base_path().'/public_html';
     });
}

并将 lfm is config 更改为

'base_directory' => 'public_html',

文件管理器正在上传到正确的目录并在子目录中正确制作缩略图,但它的视图是一个损坏的符号。

我很感激任何帮助。

4

2 回答 2

0

只需去掉/laravel-filemanager/src URLs中的前缀即可。你有photos一条路线。例子:

https://quislingmovie.com/photos/shares/6183cadfd8b51.jpg

https://quislingmovie.com/photos/shares/6183cadfd8b51.jpg

在此处输入图像描述

于 2021-11-16T16:37:50.810 回答
0

您必须将新的存储路径绑定到应用程序实例。请试试这个:

应用服务提供者

public function register()
{
    $this->app->instance('path.storage', base_path() . '/public_html');
}
于 2021-11-09T18:45:10.283 回答