简体   繁体   English

主要3.3 <p:fileupload> 始终允许用户选择多个文件。 如何防止它上传视频?

[英]primefaces 3.3<p:fileupload> always allow users to select several files. how to prevent it for video upload?

I am using p:fileupload of primefaces 3.3.1. 我正在使用p:fileupload的primefaces 3.3.1。 I use to have 2.2 of primefaces to upload video file to my site. 我使用2.2的primefaces将视频文件上传到我的网站。

now when I upgraded to 3.3.1 on the interface level it will always allow the user to select several videos each time when the user clicks the button "+ Choose". 现在当我在界面级别升级到3.3.1时,每次用户点击“+选择”按钮时,用户总是会选择多个视频。 I really need to upload only one single video each time and the user should not have the possibility to select other than One video. 我真的只需要每次只上传一个视频,用户不应该选择除One视频之外的其他视频。

I have tried the option fileLimit="1" yet I was unsuccessful. 我尝试过fileLimit =“1”但我没有成功。

is there anyone familiar with this issue. 是否有人熟悉这个问题。

FYI behind the scene primefaces uses jquery file upload here is the link FYI背后的场景primefaces使用jquery文件上传这里是链接

http://blueimp.github.com/jQuery-File-Upload/ http://blueimp.github.com/jQuery-File-Upload/

Also, if anyone knows nice way of uploading video to the server I'm willing to try it. 此外,如果有人知道将视频上传到服务器的好方法,我愿意尝试。

Thank you. 谢谢。

似乎如果您不希望您的用户能够添加多个文件(在上传之前),您应该使用自动上传模式... FileUpload - Auto

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM