onComplete not running on mobile - android
amurrell opened this issue · 2 comments
I was having trouble having my onComplete run when successful on mobile. I tried using a submit button, but it would continue to bring up the choose file dialog. Eventually, I opted for no submit_button && I added:
settings.onComplete.apply($element, ['true']);
right after: $element.parent('form').submit(function(e) { e.stopPropagation(); }).submit();
and that ensured that onComplete ran on mobile. (and did not interfere with desktop functionality)
Not sure if that's the best solution or why it wasn't getting ran on mobile, but hoping this helps anyone else. Using android 4.2.2 on the nexus 4 and google chrome.
It's possible I had this problem due to my device. When I was using this code, I might not have noticed that I could not upload pdfs or html documents due to a lack of a good file manager on my phone. My Nexus was purchased through Google, and did not come with a stock file manager. It did come with quickoffice which was definitely not working with uploads. I was only able to upload image files, video files, and what not. That's it. So it might have been an issue with my phone. On mobile, iPhones can only upload images or pictures they take. Again, no pdfs or html docs..
On iphones,there are valid_extensions
in the source code.
On android,that may be the system's fault,not sure so much.