FineUploader:我可以使用JQuery包装器中的addFiles()吗? [英] FineUploader: can I use addFiles() from the JQuery wrapper?

查看:73
本文介绍了FineUploader:我可以使用JQuery包装器中的addFiles()吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想添加第二个上传按钮,该按钮专门在iOS设备上调用相机.

I'd like to add a second upload button that exclusively invokes the camera on an iOS device.

根据最近博客文章我知道可以使用addFiles()方法来完成.但是,我的项目当前正在使用FineUploader.的JQuery版本,我可以从JQuery版本访问addFiles()还是应该切换到Vanilla JS版本?

Per the recent blog post I understand this can be done using the addFiles() method. However my project is currently using the JQuery version of FineUploader. Can I access addFiles() from the JQuery version or should I switch to the Vanilla JS version?

推荐答案

使用jQuery插件时,您可以访问任何API方法.以addFiles为例:

You can access any API methods when using the jQuery plug-in. Using addFiles as an example:

$('#myUploader').fineUploader('addFiles', filesOrInputs);

filesOrInputs可以是任何一个的File<input type="file">或数组(或类似数组的结构).

filesOrInputs can be a File, an <input type="file"> or an array (or array-like structure) of either.

请参见使用jQuery插件,在自述文件中或有关详细信息.

See the "Using the jQuery plug-in" readme or the for more details.

这篇关于FineUploader:我可以使用JQuery包装器中的addFiles()吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆