Input Type File Ionic

Hey !

I just wanted to know if an input type file will be available in Ionic version 2 ?
I mean a beautiful one… :slightly_smiling:

Thanks by advance for your answer !

1 Like

Nothing on the roadmap ATM, but you could make a feature request for this.
As it’s a file input, it’s an interesting component, since it would require some native functionality as well.

Then please, how do we upload files to a remote server in ionic v2 in d meantime!! I haven’t been able to get any tutorial!!

<input type="file"

you need to style it to hide the ugly native button and layer a pretty one on top (hack)

Pls I will appreciate if u can direct me to an ionic v2 file upload tutorial!!!

any update? when i use <input type="file" the file input is not there (not rendered), thanks

Same Problem herw file input is not rendered. Are you also using ion-item around like us? The problem is now a issue:

We created a possible solution, we want to share:


In my app, I’m using a plugin to open the camera or the stored files folder

then I convert the file to base64 and send it via ajax to my backend API.

1 Like

I’d opened a issue on github to a feature request. You can collaborate with us creating the File Input Component,

1 Like

Just use this:

Hello All, I have a different issue ?
When i use <input type=“file” in my project, it works fine but after selecting file, it show reverse file type icon,
Please suggest me if any one have some solutions

1 Like

This works for me

        <label class="item item-input"> <input type="file" id="upimgfile" name="uploadfile" ng-model="orderDetails.uploadfile">
        <div class="preview-img"> <img id="myImage" width="150" height="150"  size="30" /> </div>

Great, Just setting sourceType to PHOTOLIBRARY : 0

Thanks a lot, it works for me !