bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

file upload does not work on android browser

Open daddymac72 opened this issue 9 years ago • 5 comments

I have been working with this javascript. I need it to work for major browsers including android browser but can't seem to get it to work. It works in IE desktop, Safari, ios device and desktop chrome except android browser. On android browser, when you tap the button nothing happens. Can anyone help with the solution?

 <div class="fileinput fileinput-new" data-provides="fileinput">
   <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;"></div>
   <div>
     <span class="btn btn-default btn-file"><span class="fileinput-new">Select image</span><span class="fileinput-exists">Change</span><input type="file" name="..."></span>
     <a href="#" class="btn btn-default fileinput-exists" data-dismiss="fileinput">Remove</a>
   </div>
 </div>

Which I have modified to like this because I don't want a normal button and this still does not work on android:

    <div class="fileinput fileinput-new" data-provides="fileinput">
<span class="btn btn-success btn-file">
    <input type="file" id="image" name="image" accept="image/*">
    <span class="fileinput-new"></span>
    <span class="fileinput-exists"></span>
    <div class="fileinput-preview thumbnail" data-trigger="fileinput" style="width: 200px; height: 150px;">
    </div>
</span>
  </div>

Thanks for any help that can be offered!

daddymac72 avatar Dec 30 '15 17:12 daddymac72

It happens to me also in Android cordova application. I have compiled it with Meteor, in WEB it works perfectly but not in Android app.

Kostanos avatar Feb 08 '16 15:02 Kostanos

As a workaround, try adding data-trigger="fileinput" to the span.btn.

jasny avatar Jun 08 '16 19:06 jasny

Have Jsfiddle with current div. https://jsfiddle.net/poratuk/5vo5k4ou/2/ - first variant. https://jsfiddle.net/poratuk/5vo5k4ou/3/ - second variant

Both are works for me on Android 6.0 default android browser.

Can you are repeat this error on jsfiddle ?

poratuk avatar Mar 01 '17 13:03 poratuk

We have a web page (web page not app) which has file upload control. This is default landing page once the user connects to WIFI. "SIGN IN TO NETWORK" which opens in inapp browser of the device. This does not work. In Android, the file upload option does not open in Samsung device but works in Huwaei. In Iphone, the upload options asks for take a picture and upload from gallery but when clicked on "take a picture" the inapp browser closes or crashes.

Any help is highly appreciated.

manu7984 avatar Jan 28 '18 12:01 manu7984

can any one help on this i am also facing same issue

gadasandula avatar Sep 07 '22 04:09 gadasandula