plupload icon indicating copy to clipboard operation
plupload copied to clipboard

Can't browse pictures on ios 8.0.2 using html5 or html4 runtimes

Open elfif opened this issue 12 years ago • 11 comments

Hi there.

I can't browse pictures on safari with ios 8.0.2 using html5 or html4 runtimes. When i click the add files button nothing happens. Itried the same thing using chrome on ios and it works perfect. In fact it works everywhere except on my ipad .... I also tested a "standard" input-file field with a standard upload using the same ipad and it works fine.

If someone has an idea....

elfif avatar Oct 03 '14 08:10 elfif

What exactly your code looks like? Do the examples on our site fail as well?

jayarjo avatar Oct 04 '14 08:10 jayarjo

Hi.

Thanks for the answer. I will make the tests on your website on monday morning. I have no ipad at home, it's at the office. Here is my code :

function handlerPhotosUpload() {

$("#medias-uploader").pluploadQueue({
    // General settings
    runtimes : 'html5',
    url : $("#url_upload").val(),
    unique_names : true,

    filters : {
        max_file_size : '10mb',
        min_file_size : '50kb' ,
        mime_types: [
            {title : "Image files", extensions : "jpg, gif, png, jpeg"}
        ]
    },

    init : {
        UploadComplete : function() {
            refreshPhotos();
        }
    },
    // Resize images on clientside if we can
    resize : {width : 1600, height : 1200, quality : 85}
});
}

Then the function is called when dom is ready. Hope it helps.

elfif avatar Oct 04 '14 10:10 elfif

Hi again i just tested on your website using an ios 7 device this time, and it works perfect on plupload.com. Still it doesn't work on our site. PLupload on our site works just fine on Android 4 / Chrome and any desktop browsers. I tried to use the safari remote debugger to try to catch some javascript errors or warnings in the console but so far nothing shows up.

elfif avatar Oct 06 '14 08:10 elfif

Might the button that triggers the browsing be positioned absolutely? We just lost an afternoon to realize that that was the reason plupload wasn't working on iPad on our site...

Laz75 avatar Oct 24 '14 16:10 Laz75

Hi. I had kind of the same problem. In my case the uploader is inside a twitter bootstrap tab, but not the first tab. So when Plupload is loaded, it's hidden. Someone in my team solved it and i thought he had answered you on that thread. Apparently he didn't. All my apologies for the lack of communication, cause i know it was a tricky one .... You may want to try that case too...

elfif avatar Oct 24 '14 19:10 elfif

I have the exact same problem and I cant find out a solution! My code...

    var uploader = new plupload.Uploader({
        runtimes : 'html5,flash,silverlight,html4',
        url : 'upload.php',
        max_file_size : '5mb',
        chunk_size: '490kb',
        max_retries: 3,
        browse_button : 'filepick',
        flash_swf_url : 'js/Moxie.swf',
        silverlight_xap_url : 'js/Moxie.xap',
        multi_selection: false,
        unique_names: true,
        resize : {
            width : 470,
            quality : 90,
            crop: false
        },
        filters : {
            mime_types: [
                {title : "Imagens", extensions : "jpg,jpeg,gif,png"},
            ]
        }
    });
    uploader.init();

jonathanpmartins avatar Nov 04 '14 20:11 jonathanpmartins

Hi there my trick is a dirty one. It works but it's a workaround at best, it's not a fix at all. I just bind an event to shown.bs.tab on the twitter bootstrap tab that contains the uploader and i load or reload the uploader during that event. Apparently on certain devices Pluploader UI doesn't load well if it's hidden at load time. So you need to load it again when it 's visible ..... Hope it helps

elfif avatar Nov 05 '14 08:11 elfif

Thank for your reply! Is helps a lot! My problem was solved my trigger the uploader.init(); methos soon after the target element appears on the DOM!

jonathanpmartins avatar Nov 05 '14 17:11 jonathanpmartins

Yeah, removing display:none fixed it for me. I would recommend plupload doing that itself before it loads. I'm not sure if the same problem applies if a surrounding element has display:none applied

mschipperheyn avatar Mar 10 '15 16:03 mschipperheyn

I met the problem too and i fixed it just by download the latest version of plupload , good luck!

kai-up avatar Nov 22 '16 03:11 kai-up

If any of the containers are not visible by the moment Plupload initializes, we cannot place the browse button properly (since invisible elements do not have neither size, nor position). For this reason we have a special method on the uploader object - refresh().

So simply call uploader.refresh() whenever you finally decide to display the target element.

jayarjo avatar Nov 22 '16 15:11 jayarjo