Issue in File browser for iphone in jquery mobile

Thread is closed for posting
2 posts, 0 answers
  1. Deepan
    Deepan avatar
    19 posts
    Member since:
    Oct 2013

    Posted 19 Dec 2013 Link to this post

    when using Android, I Got correct file name from file Browser  but using Iphone i got file name as "image.jpg"  for every Images
    Please give me solution for this

    . html

    <input type="file" name="file_browse" id="file_browse"/>


        var input = document.getElementById("file_browse");
        var file=input.files[0];
  2. Ivo Bratoev
    Ivo Bratoev avatar
    107 posts

    Posted 23 Dec 2013 Link to this post


    It seems IOS does not support file input completely. They added partial support in IOS 6 ( but it is not full and doesn't handle you scenario.
    You can try using the Camera.getPicture API from Cordova: . Here is a small example that works on my IOS 7 device:, onFail, {
        destinationType: Camera.DestinationType.FILE_URI,
        sourceType: Camera.PictureSourceType.PHOTOLIBRARY,
        mediaType: Camera.MediaType.Picture,
    function onSuccess(imageURI) {
    function onFail(message) {
        alert('Failed because: ' + message);

    Ivo Bratoev
    You've missed the Icenium Visual Studio Integration keynote? It has been recorded and posted here.
    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top