I have an App which uploads a photo to a hosting by using codes below :
<div style="background:black" class="item item-body">
<img ng-src="http://m.fxlegato.com/profileImages/{{datauser.email}}.jpg" align="center" style="height:80%;width:80%;margin-left:auto;margin-right: auto;display:block;">
<form action="{{ 'http://m.fxlegato.com/profileImages/upload.php?email=' + datauser.email}}" method="post" enctype="multipart/form-data">
<input type="file" class="light" name="fileToUpload" id="fileToUpload" accept="image/x-png, image/gif, image/jpeg" />
<input type="submit" class="button button-positive button-block" value="Upload Image" name="submit">
</form>
</div>
When Upload button pressed, then a message from my upload.php appears. The photo is uploaded successfully, But I can't get back to my app while I am in that .php messages. This problem appears after I added the crosswalk to my app. If I not use that crosswalk, all works perfect.
How to solve this problem?
IHMO, basic HTML forms, with a basic action
are not a good solution to use on hybrid apps.
Since your are uploading a file, you should consider using a dedicated library, like one of those two:
Also, some tutorials are available to do this kind of stuff. Here is an example: