Show a bottom sheet or dialog containing whatever you want user to choose files from and wait till user returns to app with file path or uri and then pass that with UploadFile method.
You provide the file mimetype to set the...mimetype when the file is saved on the "uploaded to" server. Most servers require this information. I believe the upload block automatically provides the mimetype from the file extension.
I know it provides but actually I want to allow the user to select files of all mimeType on their device even if they get an error. (This is what actually happens in Chrome too.)
Do you think this will work ? (I can't test it myself cuz I can't connect to AI2 Companion bcz my laptop has got some internal errors and I'm using MIT AI2 on my android. [ You can't even imagine how hard it is to use MIT AI2 in a mobile phone. ])