【问题标题】:Yii2 Noam Image manager save outside web folderYii2 Noam 图像管理器保存在网络文件夹之外
【发布时间】:2017-05-11 08:14:05
【问题描述】:

我为我的 yii2 应用程序使用 noam 图像管理器 https://github.com/noam148/yii2-image-manager

在组件中,他们告诉我放这个

'components' => [
    'imagemanager' => [
        'class' => 'noam148\imagemanager\components\ImageManagerGetPath',
        //set media path (outside the web folder is possible)
        'mediaPath' => '/path/where/to/store/images/media/imagemanager',
        //path relative web folder to store the cache images
        'cachePath' => 'assets/images',
        //use filename (seo friendly) for resized images else use a hash
        'useFilename' => true,
        //show full url (for example in case of a API)
        'absoluteUrl' => false,
    ],
],

我尝试了很多次让扩展在 web 文件夹之外创建文件夹,但总是无法正常工作,有人可以帮我解决这个问题吗?

【问题讨论】:

    标签: yii2 yii2-basic-app yii2-extension


    【解决方案1】:

    我找到了移动目标的方法,你只需在配置文件中制作链接快捷方式,并在params文件中使用它,你也可以直接在composer文件中修改模型

    【讨论】:

      猜你喜欢
      • 2023-03-20
      • 1970-01-01
      • 1970-01-01
      • 2013-03-06
      • 2013-08-16
      • 2018-12-07
      • 1970-01-01
      • 1970-01-01
      • 2020-11-04
      相关资源
      最近更新 更多