# \<input type="file"\> behaviour in a ionic app on Lollipop

**URL:** <https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200>\
**Category:** uncategorized\
**Created:** [September 11, 2015, 12:29pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200 "2015-09-11T12:29:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![dickydick1969](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dickydick1969/32/80953_2.png) [@dickydick1969](https://forum.ionicframework.com/u/dickydick1969)\
**Post date:** [September 11, 2015, 12:29pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/1 "2015-09-11T12:29:29Z")

</div>

We want to use the camera (as an option) with the HTML input type=file element. But how?

I’ve put a vanilla index.html in my app.

```
<!doctype html>
<html>
<body>
<input type="file">
</body>
</html>

```

If test this in my app I don not get the option to use the camera. I get this instead:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/d/6/d6b96986a94edba393cea5d322a3cc76869a9b32.png)

If I run this on the android web browser I get this:

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/f/0/f0a1e1bf961ddbff7c2b7b1f3601e501988dc0f9.png)

---

<div class="post-metadata">

**Author:** ![rgecy](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@rgecy](https://forum.ionicframework.com/u/rgecy)\
**Post date:** [September 11, 2015, 2:48pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/2 "2015-09-11T14:48:50Z")

</div>

You have to specify camera or it will just think the input is looking for any file.

```
<input type="file" accept="image/*;capture=camera">

```

May want to look into the cordova-camera api though as it offers more options.

[http://learn.ionicframework.com/formulas/cordova-camera/](http://learn.ionicframework.com/formulas/cordova-camera/)

Robert

---

<div class="post-metadata">

**Author:** ![dickydick1969](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dickydick1969/32/80953_2.png) [@dickydick1969](https://forum.ionicframework.com/u/dickydick1969)\
**Post date:** [September 11, 2015, 4:14pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/3 "2015-09-11T16:14:27Z")

</div>

> [@rgecy](#):
>
> \<input type=“file” accept=“image/\*;capture=camera”\>

Nope we tried that already… still no camera selection…

---

<div class="post-metadata">

**Author:** ![rgecy](https://avatars.discourse-cdn.com/v4/letter/r/ac8455/32.png) [@rgecy](https://forum.ionicframework.com/u/rgecy)\
**Post date:** [September 11, 2015, 5:38pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/4 "2015-09-11T17:38:48Z")

</div>

Yes, you are right. I tried it in lolipop and did the same thing. Is there some specific need for using the file input? Can I get a little more background? What are you doing with the image or image URI?

You could use the cordova-camera plugin to get the image and store the image uri in a hidden input field. I have done this with great success.

---

<div class="post-metadata">

**Author:** ![dickydick1969](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/dickydick1969/32/80953_2.png) [@dickydick1969](https://forum.ionicframework.com/u/dickydick1969)\
**Post date:** [September 14, 2015, 8:29am UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/5 "2015-09-14T08:29:17Z")

</div>

Ok thanks for your reply.

We already build it with plugins. But our manager 😄 wanted it to be build with standard HTML.  
We like to have file selection + image capture. (just like in the browser… !)

So there are we are at now.

Perhaps it is a limitation of the enclosing webbrowser control at the java side? Could we fix it there?

---

<div class="post-metadata">

**Author:** ![Stefferp](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@Stefferp](https://forum.ionicframework.com/u/Stefferp)\
**Post date:** [September 25, 2015, 9:09am UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/6 "2015-09-25T09:09:39Z")

</div>

Bump, would like to know this too…

> We already build it with plugins. But our manager smile wanted it to be build with standard HTML.

Your manager sounds like an asshole

---

<div class="post-metadata">

**Author:** ![warrenjoe92](https://avatars.discourse-cdn.com/v4/letter/w/a4c791/32.png) [@warrenjoe92](https://forum.ionicframework.com/u/warrenjoe92)\
**Post date:** [January 7, 2016, 11:32pm UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/7 "2016-01-07T23:32:09Z")

</div>

Hi everyone,

If anyone is still looking for the solution, installing Crosswalk should fix the problem

[http://blog.ionic.io/crosswalk-comes-to-ionic/](http://blog.ionic.io/crosswalk-comes-to-ionic/)

Cheers (:

---

<div class="post-metadata">

**Author:** ![duonglei](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/duonglei/32/98537_2.png) [@duonglei](https://forum.ionicframework.com/u/duonglei)\
**Post date:** [January 23, 2016, 4:20am UTC](https://forum.ionicframework.com/t/input-type-file-behaviour-in-a-ionic-app-on-lollipop/32200/8 "2016-01-23T04:20:24Z")

</div>

It fix the camera issue, but I still cant not use the multiple file selectors
