kartik-v / yii2-widget-fileinput

An enhanced FileInput widget for Bootstrap 4.x/3.x with file preview, multiple selection, and more features (sub repo split from yii2-widgets)
Other
229 stars 96 forks source link

Yii2 Integration #163

Closed anasjaghoub closed 4 years ago

anasjaghoub commented 4 years ago

I used to use this widget longtime ago with Yii2 and it's working fine. Recently I returned to use it in a new Yii2 project using Bootstrap4. Honestly I find it very hard to get a complete running example using Yii2 for Ajax image upload. I've browsed the complete demo site and read most of the documentation, couldn't find a complete example.

I need a complete guide tutorial how to use it with Yii2.

Thanks in advance.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/89920522-yii2-integration?utm_campaign=plugin&utm_content=tracker%2F8184669&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F8184669&utm_medium=issues&utm_source=github).
NLeone commented 4 years ago

I used to use this widget longtime ago with Yii2 and it's working fine. Recently I returned to use it in a new Yii2 project using Bootstrap4. Honestly I find it very hard to get a complete running example using Yii2 for Ajax image upload. I've browsed the complete demo site and read most of the documentation, couldn't find a complete example.

I need a complete guide tutorial how to use it with Yii2.

Thanks in advance.

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Something similar happens to me in a new project with Yii2 version 2.0.30 and bootstrap 4 and the following happens:

Not send me the file after submitting, I use it in different projects and the code is exactly the same, I would like to know if there is a problem with the latest versions of Yii2, because I send with the fileInput field () which brings ActiveForm by default and when reviewing the array $ _FILES comes perfect, now if I use the FileInput widget of yours it already brings the empty array. I leave a little code:

$form->field($model, 'file_1')->widget(FileInput::class, [ 'options' => ['accept' => 'image/*']]);

Send nothing in $_FILES:

$form->field($model, 'file_1')->fileInput();

Send the file correctly...Can someone help me please? Cheers.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.