yii2-ueditor-widget
yii2-ueditor-widget copied to clipboard
UEditor for Yii2
如题,我上传的资源都要放到OSS中,访问路径也是,请问能不能自定义上传的处理功能?
字段规则是必填,可是为空的时候没有校验
`UEditorAsset` 是 `AssetBundle` 类,默认情况下,当发布资源包时,所有在 `yii\web\AssetBundle::$sourcePath` 目录里的内容都会发布。所以当前的写法将会把 `assets/php/` 内的 `.php` 文件也一并发布到 `@webroot/assets` 里;加上关闭了 CSRF 校验,就很容易遭到攻击。 应该删除不需要发布的文件;或者在UEditorAsset.php 添加以下代码,以白名单的方式发布资源文件: ```php public $publishOptions = [ 'only' => [ '*.js', '*.css', '*.gif', '*.png', '*.jpg', '*.html',...
/kucha/ueditor/Uploader.php 这个文件的182行 ```php //获取请求头并检测死链 $heads = get_headers($imgUrl, 1); if (!(stristr($heads[0], "200") && stristr($heads[0], "OK"))) { $this->stateInfo = $this->getStateInfo("ERROR_DEAD_LINK"); return; } //格式验证(扩展名验证和Content-Type验证) $fileType = strtolower(strrchr($imgUrl, '.')); if (!in_array($fileType, $this->config['allowFiles']) || stristr($heads['Content-Type'],...
新版本yii2中, 返回json会直接追加一个null
应该是1.2.1吧,不知为啥写成1.21了,我不太敢用*标示,怕升级有兼容问题,只敢写成1.2.*,这样一来,就升级不上去了呢。
public function run() { $this->registerClientScript(); if ($this->hasModel()) { return Html::activeTextarea($this->model, $this->attribute, ['id' => $this->id]); } else { return Html::textarea(**$this->id**, $this->value, ['id' => $this->id]); } }
  第二个才是正确路径
视频上传成功以后,点击查看源码,视频url丢失