Closed palexandrite closed 5 years ago
Update to the latest release of the extension via composer
If you are still facing the error try setting the encodeUrl property to false
within pluginOptions
.
If you are still facing the error try setting the encodeUrl property to
false
withinpluginOptions
.
Thank you very much, Kartik. I didn't get that error again. Thanks a lot.
Prerequisites
master
branch of yii2-widget-fileinput.Steps to reproduce the issue
$object[]['key'] = $company->id; echo $form->field($model, 'file')->widget(FileInput::class, [ 'options' => ['accept' => 'image/*'], 'pluginOptions' => [ 'deleteUrl' => Url::to(['/companies/delete-logo']), 'initialPreviewConfig' => $object,// конфигурация для удаления фотографий, 'initialPreview' => $company->logo ? Yii::$app->request->pathInfo.$company->logo : '', 'initialPreviewAsData' => true, 'fileActionSettings' => [ // 'initialPreviewShowDelete' => false, 'showZoom' => false, 'showRemove' => false, ], 'showCaption' => false, 'showRemove' => false, 'showUpload' => false, 'browseClass' => 'btn btn-primary btn-block', 'browseIcon' => '<i class="fas fa-camera-retro"></i>', 'browseLabel' => Yii::t('ih', 'Выбрать логотип'), 'maxFileSize' => 15000, ], ])
Expected behavior and actual behavior
When I follow those steps, I see 404 error and not a normally encoded slash — %252F.
I was expecting to delete the image and a normally encoded slash — %2F.
Environment
Browsers
Operating System
Libraries
Isolating the problem