Uploading file from android or mobile devices

I have a website written in yii2. Very briefly, this provides users authentication and gives them the ability to upload jpg files.

Via web everything is working correctly, but not with smartphones.

In particular, the process of file upload, does not work if you try to upload the files from the mobile. For some reason from Android devices the mime type is not recognized and even the right size, the same with ios, where you lose the Exif data. This is because probably the UploadForm charge the thumbnail used by smartphones to represent the file, instead of the real file.

Is there a way to solve this problem?

I thought well to write an app, but even here I found difficulties.

1 - How do I log into the site from the app?

I thought of using Restful, but for login and user management I use Amnah user module and I do not think it can be used with Restful.

2 - I log into the web and use the app just to load the image file?

Not the height of elegance, but maybe possible, but here’s another problem. When I load the file via the file upload process, the controller performs a series of successive operations (check and scaling image, extract exif data, write some infos in db, and so on). Is there a way to launch an action of a controller once uploaded the file, like a normal php script?

It is possible that my approach is completely wrong, so any idea or advice are welcome.