How to load images in Yii 2 using Ajax without plugins?

Good time of day. Want to deal with downloading images using ajax.
No Ajax implemented and all works well. But the idea is to upload the photo immediately when they are selected from Windows Explorer.
I just can't figure out how to catch an asynchronous request in action. Ie I keep track of the changes to the file field, give the files in action. In the array FILES has all the files, all good comes. But then I'm blocked. With normal download of pictures, while sending, I get everything from the model generally, and there is as such no model. Or I misunderstood something. Explain please in what side to dig? Or such things as something different done?
Don't want to use ready-made solutions, because I think that such a simple thing you need to be able to do. On a normal php in the procedural style, still do and can't draw a parallel.
June 14th 19 at 20:06

Find more questions by tags AJAX