Pergunta

I'm trying to use "container" attribute pointing to iframe in mobile site version, but inkfilepicker sends desktop content in this case for both desktop and mobile devices. In attribute "container" is removed, I'm getting a new tab with mobile content. Please advice.

selectFilepickerService: function(service){
    var maxFilesize = $('#ufilepickContent form[name="filepickerConf"] input[name="max_file_size"]').val();
    this.lastService = service;
    filepicker.pick({
        mimetypes: ['image/*'],
        container: 'ufilepickService',
        maxSize  : maxFilesize,
        services : service
    }, $.proxy(function(fpfile){
        this.saveImage(fpfile.url, fpfile.filename);
    }, this));
},
Foi útil?

Solução

You can pass a parameter to force mobile mode by using mobile: true, for example

filepicker.pick({
    mimetypes: ['image/*'],
    container: 'ufilepickService',
    mobile: true,
    maxSize  : maxFilesize,
    services : service
}, $.proxy(function(fpfile){
    this.saveImage(fpfile.url, fpfile.filename);
}, this));
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top