【问题标题】:Mobile upload select camera手机上传选择相机
【发布时间】:2014-04-08 08:31:36
【问题描述】:

对于我们的 web 应用程序,我们使用 Plupload 插件在应用程序中上传文件。在我们的应用程序中使用 input[type=file] 字段时:在 Android 和 Ios 上,手机有机会 用摄像头拍照。

当用户喜欢上传图片时,Plupload 使用 a 标签点击。但在 iPhone 上 用户在使用 Plupload 时只能从图库中选择图片。 Iphone 这样做是因为文件上传表单是由 Plupload 中的 javasscipt 呈现的。

有没有办法解决这个问题?

正常情况: iPhone 可以使用内置摄像头拍照

<input type="file" name="plaatje" placeholder="Maak foto">

Plupload情况:在Iphone上只能选择图库的一张照片(标签由Plupload生成)

<a id="uploader_browse" class="plupload_button plupload_add" href="#" style="position: relative; z-index: 1;">Foto's selecteren</a>

Plupload 设置

$("#uploader").pluploadQueue({
    // General settings
    runtimes : 'html5',
    url : base_url+'genius/upload/image/',
    max_file_size : '3mb',
    unique_names : false,

    // Specify what files to browse for
    filters : [
        {title : "Image files", extensions : "jpg,gif,png"}
    ],

    // Flash settings -> if needed
    flash_swf_url : '/plupload/js/plupload.flash.swf',

    // Silverlight settings -> if needed
    silverlight_xap_url : '/plupload/js/plupload.silverlight.xap'
});

【问题讨论】:

  • 您找到解决方案了吗?我也有同样的问题

标签: jquery ios mobile plupload


【解决方案1】:

将 multi_selection 设置为“false”...这对我运行 iOS7 的 iPhone 有效

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-21
    • 2023-03-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多