How to make work with the image in Yii2 logical?

Good day

There are a lot of extensions for image upload in Yii 2, but those with whom he worked offer a ajax loading of images. This means that the image will be downloaded/removed/replaced before we save the record in the database. That is, as if the image separately, the model separately.

The logic behind the rest of the other fields. We can change as much as you like, but not yet clicked "save" nothing happens. Want with the images was the same, it is logical TZ the end-user.

Are there any extensions that allow you to work in this vein?
June 10th 19 at 14:38
2 answers
June 10th 19 at 14:40
There is no such extension. Because it is pointless. This functionality is created literally by adding fileinput in the form and then send its contents along with other data. You need to do is find a library that will be able to reflect on the contents of this climate of fileinput. Either the most such to write, it is not difficult. As a small but comprehensive manual on using this form element on the client: https://developer.mozilla.org/ru/docs/Web/API/File...
June 10th 19 at 14:42
Good morning.
Once used here in this package.
Image can be uploaded before form submission and after.

Find more questions by tags Yii